From 401bf9b4708c19d3c86c888ce482014ca559a5b8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 20:30:24 -0700 Subject: [PATCH 001/166] process.c: Use socklen_t, not int, for socket lengths. --- ChangeLog | 6 ++++ Makefile.in | 2 +- aclocal.m4 | 1 + configure | 75 +++++++++++++++++++++++++++++++++++++++++-------- configure.in | 1 - lib/Makefile.in | 19 +++++++------ lib/gnulib.mk | 2 +- m4/gl-comp.m4 | 4 +++ m4/socklen.m4 | 65 ++++++++++++++++++++++++++++++++++++++++++ src/ChangeLog | 10 +++++++ src/config.in | 3 ++ src/process.c | 13 +++++---- 12 files changed, 171 insertions(+), 30 deletions(-) create mode 100644 m4/socklen.m4 diff --git a/ChangeLog b/ChangeLog index fdde50669b5..8928b2aceeb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-03-17 Paul Eggert + + * Makefile.in (GNULIB_MODULES): Add socklen. + * configure.in: Do not check for sys/socket.h, since socklen does that. + * m4/socklen.m4: New automatically-generated file, from gnulib. + 2011-03-13 Paul Eggert Update for gnulib. diff --git a/Makefile.in b/Makefile.in index 19267f82121..bc8ae5a9589 100644 --- a/Makefile.in +++ b/Makefile.in @@ -332,7 +332,7 @@ DOS_gnulib_comp.m4 = gl-comp.m4 # as per $(gnulib_srcdir)/DEPENDENCIES. GNULIB_MODULES = \ crypto/md5 dtoastr filemode getloadavg getopt-gnu \ - ignore-value intprops lstat mktime readlink strftime symlink sys_stat + ignore-value intprops lstat mktime readlink socklen strftime symlink sys_stat GNULIB_TOOL_FLAGS = \ --import --no-changelog --no-vc-files --makefile-name=gnulib.mk sync-from-gnulib: $(gnulib_srcdir) diff --git a/aclocal.m4 b/aclocal.m4 index 1536f3b48b5..9bd85a88bbe 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -999,6 +999,7 @@ m4_include([m4/md5.m4]) m4_include([m4/mktime.m4]) m4_include([m4/multiarch.m4]) m4_include([m4/readlink.m4]) +m4_include([m4/socklen.m4]) m4_include([m4/st_dm_mode.m4]) m4_include([m4/stat.m4]) m4_include([m4/stdbool.m4]) diff --git a/configure b/configure index 57ecd9d52eb..eed1c70599e 100755 --- a/configure +++ b/configure @@ -2960,6 +2960,7 @@ as_fn_append ac_header_list " getopt.h" as_fn_append ac_func_list " lstat" as_fn_append ac_func_list " alarm" as_fn_append ac_func_list " readlink" +as_fn_append ac_header_list " sys/socket.h" as_fn_append ac_header_list " wchar.h" as_fn_append ac_header_list " stdint.h" as_fn_append ac_func_list " tzset" @@ -6141,6 +6142,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } # Code from module mktime: # Code from module multiarch: # Code from module readlink: + # Code from module socklen: # Code from module stat: # Code from module stdbool: # Code from module stddef: @@ -7966,18 +7968,6 @@ $as_echo "#define NO_MATHERR 1" >>confdefs.h fi -for ac_header in sys/socket.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SOCKET_H 1 -_ACEOF - -fi - -done - for ac_header in net/if.h do : ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default @@ -14784,6 +14774,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : @@ -16356,6 +16350,63 @@ $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h + # Code from module socklen: + ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include + #if HAVE_SYS_SOCKET_H + # include + #endif +" +if test "x$ac_cv_type_socklen_t" = xyes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 +$as_echo_n "checking for socklen_t equivalent... " >&6; } + if ${gl_cv_socklen_t_equiv+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + gl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t "unsigned int" "long int" "unsigned long int"; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + + int getpeername (int, $arg2 *, $t *); +int +main () +{ +$t len; + getpeername (0, 0, &len); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_socklen_t_equiv="$t" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$gl_cv_socklen_t_equiv" != "" && break + done + test "$gl_cv_socklen_t_equiv" != "" && break + done + +fi + + if test "$gl_cv_socklen_t_equiv" = ""; then + as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 +$as_echo "$gl_cv_socklen_t_equiv" >&6; } + +cat >>confdefs.h <<_ACEOF +#define socklen_t $gl_cv_socklen_t_equiv +_ACEOF + +fi + # Code from module stat: diff --git a/configure.in b/configure.in index 086a7e12d67..11b7ad4db05 100644 --- a/configure.in +++ b/configure.in @@ -1265,7 +1265,6 @@ if test $emacs_cv_struct_exception != yes; then AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.]) fi -AC_CHECK_HEADERS(sys/socket.h) AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT #if HAVE_SYS_SOCKET_H #include diff --git a/lib/Makefile.in b/lib/Makefile.in index 502b3dbb927..8be57520014 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -24,7 +24,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink strftime symlink sys_stat +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen strftime symlink sys_stat VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -57,14 +57,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/longlong.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/md5.m4 \ $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ - $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ - $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \ - $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ - $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ - $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in + $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/socklen.m4 \ + $(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat.m4 \ + $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ + $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdlib_h.m4 \ + $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/symlink.m4 \ + $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/time_h.m4 \ + $(top_srcdir)/m4/time_r.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \ + $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/lib/gnulib.mk b/lib/gnulib.mk index cd6a1d00c15..369b7a48732 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink strftime symlink sys_stat +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen strftime symlink sys_stat MOSTLYCLEANFILES += core *.stackdump diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4 index 8bf5a64a5f9..7f8b5a79070 100644 --- a/m4/gl-comp.m4 +++ b/m4/gl-comp.m4 @@ -45,6 +45,7 @@ AC_DEFUN([gl_EARLY], # Code from module mktime: # Code from module multiarch: # Code from module readlink: + # Code from module socklen: # Code from module stat: # Code from module stdbool: # Code from module stddef: @@ -111,6 +112,8 @@ AC_DEFUN([gl_INIT], # Code from module readlink: gl_FUNC_READLINK gl_UNISTD_MODULE_INDICATOR([readlink]) + # Code from module socklen: + gl_TYPE_SOCKLEN_T # Code from module stat: gl_FUNC_STAT gl_SYS_STAT_MODULE_INDICATOR([stat]) @@ -327,6 +330,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/mktime.m4 m4/multiarch.m4 m4/readlink.m4 + m4/socklen.m4 m4/st_dm_mode.m4 m4/stat.m4 m4/stdbool.m4 diff --git a/m4/socklen.m4 b/m4/socklen.m4 new file mode 100644 index 00000000000..28dcf070463 --- /dev/null +++ b/m4/socklen.m4 @@ -0,0 +1,65 @@ +# socklen.m4 serial 9 +dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Albert Chin, Windows fixes from Simon Josefsson. + +dnl Check for socklen_t: historically on BSD it is an int, and in +dnl POSIX 1g it is a type of its own, but some platforms use different +dnl types for the argument to getsockopt, getpeername, etc.: +dnl HP-UX 10.20, IRIX 6.5, Interix 3.5, BeOS. +dnl So we have to test to find something that will work. + +dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find +dnl it there first. That file is included by gnulib's sys_socket.in.h, which +dnl all users of this module should include if they want to be portable to +dnl mingw32. Cygwin must not include ws2tcpip.h. +AC_DEFUN([gl_TYPE_SOCKLEN_T], + [AC_REQUIRE([gl_PREREQ_TYPE_SOCKLEN_T])dnl + AC_CHECK_TYPE([socklen_t], , + [AC_MSG_CHECKING([for socklen_t equivalent]) + AC_CACHE_VAL([gl_cv_socklen_t_equiv], + [# Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + gl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t "unsigned int" "long int" "unsigned long int"; do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include + #include + + int getpeername (int, $arg2 *, $t *);]], + [[$t len; + getpeername (0, 0, &len);]])], + [gl_cv_socklen_t_equiv="$t"]) + test "$gl_cv_socklen_t_equiv" != "" && break + done + test "$gl_cv_socklen_t_equiv" != "" && break + done + ]) + if test "$gl_cv_socklen_t_equiv" = ""; then + AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) + fi + AC_MSG_RESULT([$gl_cv_socklen_t_equiv]) + AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv], + [type to use in place of socklen_t if not defined])], + [#include + #if HAVE_SYS_SOCKET_H + # include + ]m4_ifdef([gl_SYS_SOCKET_H_DEFAULTS], + [#elif HAVE_WS2TCPIP_H + # include ] + )[#endif])]) + +AC_DEFUN([gl_PREREQ_TYPE_SOCKLEN_T], + [AC_CHECK_HEADERS_ONCE([sys/socket.h]) + m4_ifdef([gl_SYS_SOCKET_H_DEFAULTS], + [if test $ac_cv_header_sys_socket_h = no; then + dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make + dnl the check for those headers unconditional; yet cygwin reports + dnl that the headers are present but cannot be compiled (since on + dnl cygwin, all socket information should come from sys/socket.h). + AC_CHECK_HEADERS([ws2tcpip.h]) + fi])]) diff --git a/src/ChangeLog b/src/ChangeLog index d97969c24db..6eaa52ee285 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2011-03-18 Paul Eggert + + * process.c (Fmake_network_process): Use socklen_t, not int, + where POSIX says socklen_t is required in portable programs. + This fixes a porting bug on hosts like 64-bit HP-UX, where + socklen_t is wider than int. + (Fmake_network_process, server_accept_connection): + (wait_reading_process_output, read_process_output): + Likewise. + 2011-03-17 Paul Eggert Fix more problems found by GCC 4.5.2's static checks. diff --git a/src/config.in b/src/config.in index fbd3ee9338d..8b7312faaaa 100644 --- a/src/config.in +++ b/src/config.in @@ -1209,6 +1209,9 @@ along with GNU Emacs. If not, see . */ /* Define to `unsigned int' if does not define. */ #undef size_t +/* type to use in place of socklen_t if not defined */ +#undef socklen_t + /* Define to any substitute for sys_siglist. */ #undef sys_siglist diff --git a/src/process.c b/src/process.c index c9b420ab2ae..5a410c1e924 100644 --- a/src/process.c +++ b/src/process.c @@ -3467,7 +3467,7 @@ usage: (make-network-process &rest ARGS) */) if (EQ (service, Qt)) { struct sockaddr_in sa1; - int len1 = sizeof (sa1); + socklen_t len1 = sizeof (sa1); if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) { ((struct sockaddr_in *)(lres->ai_addr))->sin_port = sa1.sin_port; @@ -3514,7 +3514,8 @@ usage: (make-network-process &rest ARGS) */) /* Unlike most other syscalls connect() cannot be called again. (That would return EALREADY.) The proper way to wait for completion is select(). */ - int sc, len; + int sc; + socklen_t len; SELECT_TYPE fdset; retry_select: FD_ZERO (&fdset); @@ -3587,7 +3588,7 @@ usage: (make-network-process &rest ARGS) */) if (!is_server) { struct sockaddr_in sa1; - int len1 = sizeof (sa1); + socklen_t len1 = sizeof (sa1); if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) contact = Fplist_put (contact, QClocal, conv_sockaddr_to_lisp ((struct sockaddr *)&sa1, len1)); @@ -4192,7 +4193,7 @@ server_accept_connection (Lisp_Object server, int channel) struct sockaddr_un un; #endif } saddr; - int len = sizeof saddr; + socklen_t len = sizeof saddr; s = accept (channel, &saddr.sa, &len); @@ -5059,7 +5060,7 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, /* getsockopt(,,SO_ERROR,,) is said to hang on some systems. So only use it on systems where it is known to work. */ { - int xlen = sizeof (xerrno); + socklen_t xlen = sizeof (xerrno); if (getsockopt (channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen)) xerrno = errno; } @@ -5171,7 +5172,7 @@ read_process_output (Lisp_Object proc, register int channel) /* We have a working select, so proc_buffered_char is always -1. */ if (DATAGRAM_CHAN_P (channel)) { - int len = datagram_address[channel].len; + socklen_t len = datagram_address[channel].len; nbytes = recvfrom (channel, chars + carryover, readmax, 0, datagram_address[channel].sa, &len); } From 7710357ceb6f58d34b85c665d7a3a3e1a3abd044 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 21:43:32 -0700 Subject: [PATCH 002/166] * callproc.c (call_process_cleanup): Now static. --- src/ChangeLog | 4 ++++ src/callproc.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 93c8245b239..2271734e707 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-18 Paul Eggert + + * callproc.c (call_process_cleanup): Now static. + 2011-03-17 Eli Zaretskii * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h. diff --git a/src/callproc.c b/src/callproc.c index c53a92bbaf8..2fffb9d02a7 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -107,7 +107,7 @@ call_process_kill (Lisp_Object fdpid) return Qnil; } -Lisp_Object +static Lisp_Object call_process_cleanup (Lisp_Object arg) { Lisp_Object fdpid = Fcdr (arg); From cb1d0ef7c91692a70f3628c5b33095e48f325250 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 21:45:18 -0700 Subject: [PATCH 003/166] * callproc.c (relocate_fd): Rename locals to avoid shadowing. --- src/ChangeLog | 1 + src/callproc.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2271734e707..1d27999b49d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-18 Paul Eggert * callproc.c (call_process_cleanup): Now static. + (relocate_fd): Rename locals to avoid shadowing. 2011-03-17 Eli Zaretskii diff --git a/src/callproc.c b/src/callproc.c index 2fffb9d02a7..04b8aa3332d 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1272,12 +1272,12 @@ relocate_fd (int fd, int minfd) #endif if (new == -1) { - const char *message1 = "Error while setting up child: "; + const char *message_1 = "Error while setting up child: "; const char *errmessage = strerror (errno); - const char *message2 = "\n"; - emacs_write (2, message1, strlen (message1)); + const char *message_2 = "\n"; + emacs_write (2, message_1, strlen (message_1)); emacs_write (2, errmessage, strlen (errmessage)); - emacs_write (2, message2, strlen (message2)); + emacs_write (2, message_2, strlen (message_2)); _exit (1); } emacs_close (fd); From 6bd8c14466b0787f9675279727efdff93bced7bb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 21:58:44 -0700 Subject: [PATCH 004/166] * lisp.h (child_setup): Now NO_RETURN unless DOS_NT. This should get cleaned up, so that child_setup has the same signature on all platforms. --- src/ChangeLog | 4 ++++ src/lisp.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1d27999b49d..da9676233e0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-18 Paul Eggert + * lisp.h (child_setup): Now NO_RETURN unless DOS_NT. + This should get cleaned up, so that child_setup has the + same signature on all platforms. + * callproc.c (call_process_cleanup): Now static. (relocate_fd): Rename locals to avoid shadowing. diff --git a/src/lisp.h b/src/lisp.h index 283b0989c1d..645b82c80cf 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3233,7 +3233,11 @@ extern void syms_of_process (void); extern void setup_process_coding_systems (Lisp_Object); EXFUN (Fcall_process, MANY); -extern int child_setup (int, int, int, char **, int, Lisp_Object); +extern int child_setup (int, int, int, char **, int, Lisp_Object) +#ifndef DOS_NT + NO_RETURN +#endif + ; extern void init_callproc_1 (void); extern void init_callproc (void); extern void set_initial_environment (void); From 7e9123a200047d0caaaa02e866aae6b7c4cebeb6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 22:06:34 -0700 Subject: [PATCH 005/166] * sysdep.c (sys_subshell): Use 'volatile' to avoid vfork clobbering. Before, this 'volatile' was incorrectly IF_LINTted out. --- src/ChangeLog | 3 +++ src/sysdep.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index da9676233e0..53f66bd8032 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-18 Paul Eggert + * sysdep.c (sys_subshell): Use 'volatile' to avoid vfork clobbering. + Before, this 'volatile' was incorrectly IF_LINTted out. + * lisp.h (child_setup): Now NO_RETURN unless DOS_NT. This should get cleaned up, so that child_setup has the same signature on all platforms. diff --git a/src/sysdep.c b/src/sysdep.c index 6ef3d88c5c8..889ff6d83eb 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -488,7 +488,11 @@ sys_subshell (void) int pid; struct save_signal saved_handlers[5]; Lisp_Object dir; - unsigned char * IF_LINT (volatile) str = 0; + + /* Volatile because otherwise vfork might clobber it on some hosts. */ + unsigned char *volatile dirstr = 0; + + unsigned char *str; int len; saved_handlers[0].code = SIGINT; @@ -512,7 +516,7 @@ sys_subshell (void) goto xyzzy; dir = expand_and_dir_to_file (Funhandled_file_name_directory (dir), Qnil); - str = (unsigned char *) alloca (SCHARS (dir) + 2); + str = dirstr = (unsigned char *) alloca (SCHARS (dir) + 2); len = SCHARS (dir); memcpy (str, SDATA (dir), len); if (str[len - 1] != '/') str[len++] = '/'; @@ -544,6 +548,7 @@ sys_subshell (void) sh = "sh"; /* Use our buffer's default directory for the subshell. */ + str = dirstr; if (str && chdir ((char *) str) != 0) { #ifndef DOS_NT From 591b2973e740d73b4bd00a78e8dc5444d59a22f3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 22:09:58 -0700 Subject: [PATCH 006/166] Add Bug#. --- src/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6eaa52ee285..f1a6dcb3c17 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,7 +3,7 @@ * process.c (Fmake_network_process): Use socklen_t, not int, where POSIX says socklen_t is required in portable programs. This fixes a porting bug on hosts like 64-bit HP-UX, where - socklen_t is wider than int. + socklen_t is wider than int (Bug#8277). (Fmake_network_process, server_accept_connection): (wait_reading_process_output, read_process_output): Likewise. From 5e41f65daf496cc39cd8bef55a28525b78f97d3d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 22:50:40 -0700 Subject: [PATCH 007/166] Better fix for volatile issue. --- src/sysdep.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/sysdep.c b/src/sysdep.c index 889ff6d83eb..14db0fd26d0 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -488,10 +488,7 @@ sys_subshell (void) int pid; struct save_signal saved_handlers[5]; Lisp_Object dir; - - /* Volatile because otherwise vfork might clobber it on some hosts. */ - unsigned char *volatile dirstr = 0; - + unsigned char *volatile str_volatile = 0; unsigned char *str; int len; @@ -516,7 +513,7 @@ sys_subshell (void) goto xyzzy; dir = expand_and_dir_to_file (Funhandled_file_name_directory (dir), Qnil); - str = dirstr = (unsigned char *) alloca (SCHARS (dir) + 2); + str_volatile = str = (unsigned char *) alloca (SCHARS (dir) + 2); len = SCHARS (dir); memcpy (str, SDATA (dir), len); if (str[len - 1] != '/') str[len++] = '/'; @@ -548,7 +545,7 @@ sys_subshell (void) sh = "sh"; /* Use our buffer's default directory for the subshell. */ - str = dirstr; + str = str_volatile; if (str && chdir ((char *) str) != 0) { #ifndef DOS_NT From b9c7f648f0a8af1492b32d53e0779198d28d6603 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 22:56:46 -0700 Subject: [PATCH 008/166] * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering. --- src/ChangeLog | 5 +++-- src/callproc.c | 10 +++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 53f66bd8032..b8ab24a7121 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,8 @@ 2011-03-18 Paul Eggert - * sysdep.c (sys_subshell): Use 'volatile' to avoid vfork clobbering. - Before, this 'volatile' was incorrectly IF_LINTted out. + * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering. + * sysdep.c (sys_subshell): Likewise. + Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out. * lisp.h (child_setup): Now NO_RETURN unless DOS_NT. This should get cleaned up, so that child_setup has the diff --git a/src/callproc.c b/src/callproc.c index 04b8aa3332d..75f239d1be2 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -180,7 +180,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) (int nargs, register Lisp_Object *args) { Lisp_Object infile, buffer, current_dir, path; - int display_p; + volatile int display_p_volatile; int fd[2]; int filefd; register int pid; @@ -190,6 +190,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) int bufsize = CALLPROC_BUFFER_SIZE_MIN; int count = SPECPDL_INDEX (); + const unsigned char **volatile new_argv_volatile; register const unsigned char **new_argv; /* File to use for stderr in the child. t means use same as standard output. */ @@ -343,7 +344,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) UNGCPRO; } - display_p = INTERACTIVE && nargs >= 4 && !NILP (args[3]); + display_p_volatile = INTERACTIVE && nargs >= 4 && !NILP (args[3]); filefd = emacs_open (SSDATA (infile), O_RDONLY, 0); if (filefd < 0) @@ -371,7 +372,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) && SREF (path, 1) == ':') path = Fsubstring (path, make_number (2), Qnil); - new_argv = (const unsigned char **) + new_argv_volatile = new_argv = (const unsigned char **) alloca (max (2, nargs - 2) * sizeof (char *)); if (nargs > 4) { @@ -542,6 +543,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) pid = vfork (); + new_argv = new_argv_volatile; + if (pid == 0) { if (fd[0] >= 0) @@ -673,6 +676,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) int first = 1; EMACS_INT total_read = 0; int carryover = 0; + int display_p = display_p_volatile; int display_on_the_fly = display_p; struct coding_system saved_coding; From 918436ed33aa8c600281c36454f8519df9a4147d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 23:22:42 -0700 Subject: [PATCH 009/166] * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes. --- src/ChangeLog | 2 ++ src/region-cache.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index b8ab24a7121..db115bdbfd7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-18 Paul Eggert + * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes. + * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering. * sysdep.c (sys_subshell): Likewise. Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out. diff --git a/src/region-cache.h b/src/region-cache.h index 0da159285e4..8e4336c2885 100644 --- a/src/region-cache.h +++ b/src/region-cache.h @@ -111,3 +111,5 @@ extern int region_cache_backward (struct buffer *BUF, EMACS_INT POS, EMACS_INT *NEXT); +/* For debugging. */ +void pp_cache (struct region_cache *); From c4fc4e301ecaeb98bd3041ca2ce7a106cafefef1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 23:25:25 -0700 Subject: [PATCH 010/166] * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing. --- src/ChangeLog | 2 ++ src/region-cache.c | 25 ++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index db115bdbfd7..aa9de9deacb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-18 Paul Eggert + * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing. + * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes. * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering. diff --git a/src/region-cache.c b/src/region-cache.c index 1f9b62da9fa..53ce0e9d802 100644 --- a/src/region-cache.c +++ b/src/region-cache.c @@ -290,37 +290,37 @@ move_cache_gap (struct region_cache *c, EMACS_INT pos, EMACS_INT min_size) } -/* Insert a new boundary in cache C; it will have cache index INDEX, +/* Insert a new boundary in cache C; it will have cache index I, and have the specified POS and VALUE. */ static void -insert_cache_boundary (struct region_cache *c, EMACS_INT index, EMACS_INT pos, +insert_cache_boundary (struct region_cache *c, EMACS_INT i, EMACS_INT pos, int value) { - /* index must be a valid cache index. */ - if (index < 0 || index > c->cache_len) + /* i must be a valid cache index. */ + if (i < 0 || i > c->cache_len) abort (); /* We must never want to insert something before the dummy first boundary. */ - if (index == 0) + if (i == 0) abort (); /* We must only be inserting things in order. */ - if (! (BOUNDARY_POS (c, index-1) < pos - && (index == c->cache_len - || pos < BOUNDARY_POS (c, index)))) + if (! (BOUNDARY_POS (c, i - 1) < pos + && (i == c->cache_len + || pos < BOUNDARY_POS (c, i)))) abort (); /* The value must be different from the ones around it. However, we temporarily create boundaries that establish the same value as the subsequent boundary, so we're not going to flag that case. */ - if (BOUNDARY_VALUE (c, index-1) == value) + if (BOUNDARY_VALUE (c, i - 1) == value) abort (); - move_cache_gap (c, index, 1); + move_cache_gap (c, i, 1); - c->boundaries[index].pos = pos - c->buffer_beg; - c->boundaries[index].value = value; + c->boundaries[i].pos = pos - c->buffer_beg; + c->boundaries[i].value = value; c->gap_start++; c->gap_len--; c->cache_len++; @@ -808,4 +808,3 @@ pp_cache (struct region_cache *c) fprintf (stderr, "%ld : %d\n", (long)pos, BOUNDARY_VALUE (c, i)); } } - From 500603320d95a06f8dfb25ab3f4447e115fea56d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 23:27:08 -0700 Subject: [PATCH 011/166] * sound.c (wav_play, au_play, Fplay_sound_internal): Fix pointer signedness. --- src/ChangeLog | 3 +++ src/sound.c | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index aa9de9deacb..aab298274cc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-18 Paul Eggert + * sound.c (wav_play, au_play, Fplay_sound_internal): + Fix pointer signedness. + * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing. * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes. diff --git a/src/sound.c b/src/sound.c index 3a1668e4903..47d4c325997 100644 --- a/src/sound.c +++ b/src/sound.c @@ -595,7 +595,7 @@ wav_play (struct sound *s, struct sound_device *sd) files I found so far. If someone feels inclined to implement the whole RIFF-WAVE spec, please do. */ if (STRINGP (s->data)) - sd->write (sd, SDATA (s->data) + sizeof *header, + sd->write (sd, SSDATA (s->data) + sizeof *header, SBYTES (s->data) - sizeof *header); else { @@ -686,7 +686,7 @@ au_play (struct sound *s, struct sound_device *sd) sd->configure (sd); if (STRINGP (s->data)) - sd->write (sd, SDATA (s->data) + header->data_offset, + sd->write (sd, SSDATA (s->data) + header->data_offset, SBYTES (s->data) - header->data_offset); else { @@ -1410,7 +1410,7 @@ Internal use only, use `play-sound' instead. */) { int len = SCHARS (attrs[SOUND_DEVICE]); current_sound_device->file = (char *) alloca (len + 1); - strcpy (current_sound_device->file, SDATA (attrs[SOUND_DEVICE])); + strcpy (current_sound_device->file, SSDATA (attrs[SOUND_DEVICE])); } if (INTEGERP (attrs[SOUND_VOLUME])) @@ -1498,4 +1498,3 @@ init_sound (void) } #endif /* HAVE_SOUND */ - From d01f234b5f882640c9b9046fe48a0f3987dd088a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 23:28:04 -0700 Subject: [PATCH 012/166] * sound.c (alsa_choose_format): Remove unused local var. --- src/ChangeLog | 1 + src/sound.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index aab298274cc..b35cae14094 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * sound.c (wav_play, au_play, Fplay_sound_internal): Fix pointer signedness. + (alsa_choose_format): Remove unused local var. * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing. diff --git a/src/sound.c b/src/sound.c index 47d4c325997..c886c8c40b1 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1104,7 +1104,6 @@ alsa_close (struct sound_device *sd) static void alsa_choose_format (struct sound_device *sd, struct sound *s) { - struct alsa_params *p = (struct alsa_params *) sd->data; if (s->type == RIFF) { struct wav_header *h = (struct wav_header *) s->header; From 8176119bc432d0ddb6187a4a84c81a7d9489153a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 23:42:43 -0700 Subject: [PATCH 013/166] * sound.c (wav_play): Initialize a variable to 0, to prevent undefined behavior. --- src/ChangeLog | 1 + src/sound.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index b35cae14094..69aaa359887 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * sound.c (wav_play, au_play, Fplay_sound_internal): Fix pointer signedness. (alsa_choose_format): Remove unused local var. + (wav_play): Initialize a variable to 0, to prevent undefined behavior. * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing. diff --git a/src/sound.c b/src/sound.c index c886c8c40b1..a2fe7ccc8ce 100644 --- a/src/sound.c +++ b/src/sound.c @@ -600,7 +600,7 @@ wav_play (struct sound *s, struct sound_device *sd) else { char *buffer; - int nbytes; + int nbytes = 0; int blksize = sd->period_size ? sd->period_size (sd) : 2048; int data_left = header->data_length; From 3e7d65943519072e22cb3bcff3897805f5bae7a8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 23:48:05 -0700 Subject: [PATCH 014/166] * atimer.c (start_atimer, append_atimer_lists, set_alarm): Rename locals to avoid shadowing. --- src/ChangeLog | 3 +++ src/atimer.c | 47 +++++++++++++++++++++++------------------------ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 69aaa359887..6ba2133de66 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-18 Paul Eggert + * atimer.c (start_atimer, append_atimer_lists, set_alarm): Rename + locals to avoid shadowing. + * sound.c (wav_play, au_play, Fplay_sound_internal): Fix pointer signedness. (alsa_choose_format): Remove unused local var. diff --git a/src/atimer.c b/src/atimer.c index 309a4eaee4f..e10add961eb 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -86,7 +86,7 @@ SIGTYPE alarm_signal_handler (int signo); to cancel_atimer; don't free it yourself. */ struct atimer * -start_atimer (enum atimer_type type, EMACS_TIME time, atimer_callback fn, +start_atimer (enum atimer_type type, EMACS_TIME timestamp, atimer_callback fn, void *client_data) { struct atimer *t; @@ -94,10 +94,10 @@ start_atimer (enum atimer_type type, EMACS_TIME time, atimer_callback fn, /* Round TIME up to the next full second if we don't have itimers. */ #ifndef HAVE_SETITIMER - if (EMACS_USECS (time) != 0) + if (EMACS_USECS (timestamp) != 0) { - EMACS_SET_USECS (time, 0); - EMACS_SET_SECS (time, EMACS_SECS (time) + 1); + EMACS_SET_USECS (timestamp, 0); + EMACS_SET_SECS (timestamp, EMACS_SECS (timestamp) + 1); } #endif /* not HAVE_SETITIMER */ @@ -123,18 +123,18 @@ start_atimer (enum atimer_type type, EMACS_TIME time, atimer_callback fn, switch (type) { case ATIMER_ABSOLUTE: - t->expiration = time; + t->expiration = timestamp; break; case ATIMER_RELATIVE: EMACS_GET_TIME (t->expiration); - EMACS_ADD_TIME (t->expiration, t->expiration, time); + EMACS_ADD_TIME (t->expiration, t->expiration, timestamp); break; case ATIMER_CONTINUOUS: EMACS_GET_TIME (t->expiration); - EMACS_ADD_TIME (t->expiration, t->expiration, time); - t->interval = time; + EMACS_ADD_TIME (t->expiration, t->expiration, timestamp); + t->interval = timestamp; break; } @@ -187,24 +187,24 @@ cancel_atimer (struct atimer *timer) } -/* Append two lists of atimers LIST1 and LIST2 and return the +/* Append two lists of atimers LIST_1 and LIST_2 and return the result list. */ static struct atimer * -append_atimer_lists (struct atimer *list1, struct atimer *list2) +append_atimer_lists (struct atimer *list_1, struct atimer *list_2) { - if (list1 == NULL) - return list2; - else if (list2 == NULL) - return list1; + if (list_1 == NULL) + return list_2; + else if (list_2 == NULL) + return list_1; else { struct atimer *p; - for (p = list1; p->next; p = p->next) + for (p = list_1; p->next; p = p->next) ; - p->next = list2; - return list1; + p->next = list_2; + return list_1; } } @@ -287,28 +287,28 @@ set_alarm (void) { if (atimers) { - EMACS_TIME now, time; + EMACS_TIME now, timestamp; #ifdef HAVE_SETITIMER struct itimerval it; #endif /* Determine s/us till the next timer is ripe. */ EMACS_GET_TIME (now); - EMACS_SUB_TIME (time, atimers->expiration, now); + EMACS_SUB_TIME (timestamp, atimers->expiration, now); #ifdef HAVE_SETITIMER /* Don't set the interval to 0; this disables the timer. */ if (EMACS_TIME_LE (atimers->expiration, now)) { - EMACS_SET_SECS (time, 0); - EMACS_SET_USECS (time, 1000); + EMACS_SET_SECS (timestamp, 0); + EMACS_SET_USECS (timestamp, 1000); } memset (&it, 0, sizeof it); - it.it_value = time; + it.it_value = timestamp; setitimer (ITIMER_REAL, &it, 0); #else /* not HAVE_SETITIMER */ - alarm (max (EMACS_SECS (time), 1)); + alarm (max (EMACS_SECS (timestamp), 1)); #endif /* not HAVE_SETITIMER */ } } @@ -442,4 +442,3 @@ init_atimer (void) /* pending_signals is initialized in init_keyboard.*/ signal (SIGALRM, alarm_signal_handler); } - From c83b88720cb825690820f549c1a070766b685f76 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 00:27:01 -0700 Subject: [PATCH 015/166] Add Bug#. --- src/ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6ba2133de66..576bbf50157 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -6,7 +6,8 @@ * sound.c (wav_play, au_play, Fplay_sound_internal): Fix pointer signedness. (alsa_choose_format): Remove unused local var. - (wav_play): Initialize a variable to 0, to prevent undefined behavior. + (wav_play): Initialize a variable to 0, to prevent undefined + behavior (Bug#8278). * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing. From 235d7abc8e825c66c642023ff6290ae83f6dac86 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 09:39:15 -0700 Subject: [PATCH 016/166] * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else". --- src/ChangeLog | 2 ++ src/intervals.h | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 576bbf50157..89e054f62b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-18 Paul Eggert + * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else". + * atimer.c (start_atimer, append_atimer_lists, set_alarm): Rename locals to avoid shadowing. diff --git a/src/intervals.h b/src/intervals.h index f6c1c002ce0..d7c34012e1f 100644 --- a/src/intervals.h +++ b/src/intervals.h @@ -161,8 +161,13 @@ struct interval (INTERVAL_HAS_PARENT (i) ? INTERVAL_PARENT (i) : 0) /* Abort if interval I's size is negative. */ -#define CHECK_TOTAL_LENGTH(i) \ - if ((int) (i)->total_length < 0) abort (); else +#define CHECK_TOTAL_LENGTH(i) \ + do \ + { \ + if ((int) (i)->total_length < 0) \ + abort (); \ + } \ + while (0) /* Reset this interval to its vanilla, or no-property state. */ #define RESET_INTERVAL(i) \ @@ -339,4 +344,3 @@ extern Lisp_Object get_pos_property (Lisp_Object pos, Lisp_Object prop, extern void syms_of_textprop (void); #include "composite.h" - From fc7bf02501ee772bb872561371f44a74dfb96a80 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 09:40:17 -0700 Subject: [PATCH 017/166] * intervals.c (interval_start_pos): Now static. --- src/ChangeLog | 2 ++ src/intervals.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 89e054f62b0..21475dd6a6a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-18 Paul Eggert + * intervals.c (interval_start_pos): Now static. + * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else". * atimer.c (start_atimer, append_atimer_lists, set_alarm): Rename diff --git a/src/intervals.c b/src/intervals.c index 12b2789cc77..351677ad27e 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -586,7 +586,7 @@ split_interval_left (INTERVAL interval, EMACS_INT offset) Don't use this function on an interval which is the child of another interval! */ -int +static int interval_start_pos (INTERVAL source) { Lisp_Object parent; @@ -2559,4 +2559,3 @@ set_intervals_multibyte (int multi_flag) set_intervals_multibyte_1 (BUF_INTERVALS (current_buffer), multi_flag, BEG, BEG_BYTE, Z, Z_BYTE); } - From ff08eb8560405630be43c0543aa5558ed0fe6cbf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 09:42:05 -0700 Subject: [PATCH 018/166] * textprop.c (property_change_between_p): Remove; unused. --- src/ChangeLog | 2 ++ src/textprop.c | 32 -------------------------------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 21475dd6a6a..65b7bccd79e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-18 Paul Eggert + * textprop.c (property_change_between_p): Remove; unused. + * intervals.c (interval_start_pos): Now static. * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else". diff --git a/src/textprop.c b/src/textprop.c index 5db6033670b..cd89efeb38d 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -974,37 +974,6 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) return make_number (next->position); } -/* Return 1 if there's a change in some property between BEG and END. */ - -int -property_change_between_p (EMACS_INT beg, EMACS_INT end) -{ - register INTERVAL i, next; - Lisp_Object object, pos; - - XSETBUFFER (object, current_buffer); - XSETFASTINT (pos, beg); - - i = validate_interval_range (object, &pos, &pos, soft); - if (NULL_INTERVAL_P (i)) - return 0; - - next = next_interval (i); - while (! NULL_INTERVAL_P (next) && intervals_equal (i, next)) - { - next = next_interval (next); - if (NULL_INTERVAL_P (next)) - return 0; - if (next->position >= end) - return 0; - } - - if (NULL_INTERVAL_P (next)) - return 0; - - return 1; -} - DEFUN ("next-single-property-change", Fnext_single_property_change, Snext_single_property_change, 2, 4, 0, doc: /* Return the position of next property change for a specific property. @@ -2331,4 +2300,3 @@ inherits it if NONSTICKINESS is nil. The `front-sticky' and /* defsubr (&Serase_text_properties); */ /* defsubr (&Scopy_text_properties); */ } - From 760fbc2c7d8c1f3e8b38583c28d655f11f9bc0e2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 17:12:53 -0700 Subject: [PATCH 019/166] character.h: Rename locals to avoid shadowing. * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE): (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE): (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS): (BUF_DEC_POS): Be more systematic about renaming local temporaries to avoid shadowing. --- src/ChangeLog | 7 +++++ src/character.h | 68 ++++++++++++++++++++++++------------------------- 2 files changed, 41 insertions(+), 34 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 65b7bccd79e..b614091bdbb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2011-03-18 Paul Eggert + character.h: Rename locals to avoid shadowing. + * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE): + (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE): + (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS): + (BUF_DEC_POS): Be more systematic about renaming local temporaries + to avoid shadowing. + * textprop.c (property_change_between_p): Remove; unused. * intervals.c (interval_start_pos): Now static. diff --git a/src/character.h b/src/character.h index 4c468e14d2c..91020cadedc 100644 --- a/src/character.h +++ b/src/character.h @@ -278,11 +278,11 @@ along with GNU Emacs. If not, see . */ do { \ if ((p) > (limit)) \ { \ - const unsigned char *pcb = (p); \ + const unsigned char *chp = (p); \ do { \ - pcb--; \ - } while (pcb >= limit && ! CHAR_HEAD_P (*pcb)); \ - (p) = (BYTES_BY_CHAR_HEAD (*pcb) == (p) - pcb) ? pcb : (p) - 1; \ + chp--; \ + } while (chp >= limit && ! CHAR_HEAD_P (*chp)); \ + (p) = (BYTES_BY_CHAR_HEAD (*chp) == (p) - chp) ? chp : (p) - 1; \ } \ } while (0) @@ -353,11 +353,11 @@ along with GNU Emacs. If not, see . */ CHARIDX++; \ if (STRING_MULTIBYTE (STRING)) \ { \ - unsigned char *string_ptr = &SDATA (STRING)[BYTEIDX]; \ - int string_len; \ + unsigned char *chp = &SDATA (STRING)[BYTEIDX]; \ + int chlen; \ \ - OUTPUT = STRING_CHAR_AND_LENGTH (string_ptr, string_len); \ - BYTEIDX += string_len; \ + OUTPUT = STRING_CHAR_AND_LENGTH (chp, chlen); \ + BYTEIDX += chlen; \ } \ else \ { \ @@ -376,11 +376,11 @@ along with GNU Emacs. If not, see . */ CHARIDX++; \ if (STRING_MULTIBYTE (STRING)) \ { \ - unsigned char *ptr = &SDATA (STRING)[BYTEIDX]; \ - int ptrlen; \ + unsigned char *chp = &SDATA (STRING)[BYTEIDX]; \ + int chlen; \ \ - OUTPUT = STRING_CHAR_AND_LENGTH (ptr, ptrlen); \ - BYTEIDX += ptrlen; \ + OUTPUT = STRING_CHAR_AND_LENGTH (chp, chlen); \ + BYTEIDX += chlen; \ } \ else \ { \ @@ -416,11 +416,11 @@ along with GNU Emacs. If not, see . */ CHARIDX++; \ if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) \ { \ - unsigned char *ptr = BYTE_POS_ADDR (BYTEIDX); \ - int string_len; \ + unsigned char *chp = BYTE_POS_ADDR (BYTEIDX); \ + int chlen; \ \ - OUTPUT= STRING_CHAR_AND_LENGTH (ptr, string_len); \ - BYTEIDX += string_len; \ + OUTPUT= STRING_CHAR_AND_LENGTH (chp, chlen); \ + BYTEIDX += chlen; \ } \ else \ { \ @@ -436,11 +436,11 @@ along with GNU Emacs. If not, see . */ #define FETCH_CHAR_ADVANCE_NO_CHECK(OUTPUT, CHARIDX, BYTEIDX) \ do \ { \ - unsigned char *ptr = BYTE_POS_ADDR (BYTEIDX); \ - int len; \ + unsigned char *chp = BYTE_POS_ADDR (BYTEIDX); \ + int chlen; \ \ - OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len); \ - BYTEIDX += len; \ + OUTPUT = STRING_CHAR_AND_LENGTH (chp, chlen); \ + BYTEIDX += chlen; \ CHARIDX++; \ } \ while (0) @@ -451,8 +451,8 @@ along with GNU Emacs. If not, see . */ #define INC_POS(pos_byte) \ do { \ - unsigned char *ptr = BYTE_POS_ADDR (pos_byte); \ - pos_byte += BYTES_BY_CHAR_HEAD (*ptr); \ + unsigned char *chp = BYTE_POS_ADDR (pos_byte); \ + pos_byte += BYTES_BY_CHAR_HEAD (*chp); \ } while (0) @@ -461,16 +461,16 @@ along with GNU Emacs. If not, see . */ #define DEC_POS(pos_byte) \ do { \ - unsigned char *ptr; \ + unsigned char *chp; \ \ pos_byte--; \ if (pos_byte < GPT_BYTE) \ - ptr = BEG_ADDR + pos_byte - BEG_BYTE; \ + chp = BEG_ADDR + pos_byte - BEG_BYTE; \ else \ - ptr = BEG_ADDR + GAP_SIZE + pos_byte - BEG_BYTE; \ - while (!CHAR_HEAD_P (*ptr)) \ + chp = BEG_ADDR + GAP_SIZE + pos_byte - BEG_BYTE; \ + while (!CHAR_HEAD_P (*chp)) \ { \ - ptr--; \ + chp--; \ pos_byte--; \ } \ } while (0) @@ -510,8 +510,8 @@ along with GNU Emacs. If not, see . */ #define BUF_INC_POS(buf, pos_byte) \ do { \ - unsigned char *bbp = BUF_BYTE_ADDRESS (buf, pos_byte); \ - pos_byte += BYTES_BY_CHAR_HEAD (*bbp); \ + unsigned char *chp = BUF_BYTE_ADDRESS (buf, pos_byte); \ + pos_byte += BYTES_BY_CHAR_HEAD (*chp); \ } while (0) @@ -520,15 +520,15 @@ along with GNU Emacs. If not, see . */ #define BUF_DEC_POS(buf, pos_byte) \ do { \ - unsigned char *p; \ + unsigned char *chp; \ pos_byte--; \ if (pos_byte < BUF_GPT_BYTE (buf)) \ - p = BUF_BEG_ADDR (buf) + pos_byte - BEG_BYTE; \ + chp = BUF_BEG_ADDR (buf) + pos_byte - BEG_BYTE; \ else \ - p = BUF_BEG_ADDR (buf) + BUF_GAP_SIZE (buf) + pos_byte - BEG_BYTE;\ - while (!CHAR_HEAD_P (*p)) \ + chp = BUF_BEG_ADDR (buf) + BUF_GAP_SIZE (buf) + pos_byte - BEG_BYTE;\ + while (!CHAR_HEAD_P (*chp)) \ { \ - p--; \ + chp--; \ pos_byte--; \ } \ } while (0) From 8f5201aeebe612c1028a5912d81280b67b94039a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 17:16:45 -0700 Subject: [PATCH 020/166] * composite.c (composition_compute_stop_pos): Rename local to avoid shadowing. --- src/ChangeLog | 5 +++++ src/composite.c | 17 ++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b614091bdbb..1aa87aec661 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-19 Paul Eggert + + * composite.c (composition_compute_stop_pos): Rename local to + avoid shadowing. + 2011-03-18 Paul Eggert character.h: Rename locals to avoid shadowing. diff --git a/src/composite.c b/src/composite.c index 0b0602bf283..ddb0004b15b 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1115,7 +1115,7 @@ composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, if (! NILP (val)) { Lisp_Object elt; - int ridx, back, len; + int ridx, back, blen; for (ridx = 0; CONSP (val); val = XCDR (val), ridx++) { @@ -1132,17 +1132,17 @@ composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, bpos = (NILP (string) ? CHAR_TO_BYTE (cpos) : string_char_to_byte (string, cpos)); if (STRINGP (AREF (elt, 0))) - len = fast_looking_at (AREF (elt, 0), cpos, bpos, - start + 1, limit, string); + blen = fast_looking_at (AREF (elt, 0), cpos, bpos, + start + 1, limit, string); else - len = 1; - if (len > 0) + blen = 1; + if (blen > 0) { /* Make CPOS point to the last character of - match. Note that LEN is byte-length. */ - if (len > 1) + match. Note that BLEN is byte-length. */ + if (blen > 1) { - bpos += len; + bpos += blen; if (NILP (string)) cpos = BYTE_TO_CHAR (bpos) - 1; else @@ -2032,4 +2032,3 @@ See also the documentation of `auto-composition-mode'. */); defsubr (&Sfind_composition_internal); defsubr (&Scomposition_get_gstring); } - From b246f9329c26a1174f760d345927d740aaac364b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 17:18:31 -0700 Subject: [PATCH 021/166] * composite.c (composition_reseat_it): Remove unused locals. (find_automatic_composition, composition_adjust_point): Likewise. --- src/ChangeLog | 2 ++ src/composite.c | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1aa87aec661..fa16bab29c9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ * composite.c (composition_compute_stop_pos): Rename local to avoid shadowing. + (composition_reseat_it): Remove unused locals. + (find_automatic_composition, composition_adjust_point): Likewise. 2011-03-18 Paul Eggert diff --git a/src/composite.c b/src/composite.c index ddb0004b15b..86a53f91c97 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1248,8 +1248,8 @@ composition_reseat_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_I else if (w) { Lisp_Object lgstring = Qnil; - Lisp_Object val, elt, re; - int len, i; + Lisp_Object val, elt; + int i; val = CHAR_TABLE_REF (Vcomposition_function_table, cmp_it->ch); for (i = 0; i < cmp_it->rule_idx; i++, val = XCDR (val)); @@ -1491,7 +1491,6 @@ find_automatic_composition (EMACS_INT pos, EMACS_INT limit, EMACS_INT *start, EM EMACS_INT fore_check_limit; struct position_record orig, cur, check, prev; Lisp_Object check_val, val, elt; - int check_lookback; int c; Lisp_Object window; struct window *w; @@ -1657,7 +1656,7 @@ find_automatic_composition (EMACS_INT pos, EMACS_INT limit, EMACS_INT *start, EM EMACS_INT composition_adjust_point (EMACS_INT last_pt, EMACS_INT new_pt) { - EMACS_INT charpos, bytepos, startpos, beg, end, pos; + EMACS_INT beg, end; Lisp_Object val; int i; From 80e079b231d97294c2c0cbd00a8d0e68c9586d36 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 17:58:10 -0700 Subject: [PATCH 022/166] * composite.c (composition_update_it): Mark var as initialized. --- src/ChangeLog | 1 + src/composite.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index fa16bab29c9..ca10b31305d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,7 @@ avoid shadowing. (composition_reseat_it): Remove unused locals. (find_automatic_composition, composition_adjust_point): Likewise. + (composition_update_it): Mark var as initialized. 2011-03-18 Paul Eggert diff --git a/src/composite.c b/src/composite.c index 86a53f91c97..ee2e843b729 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1364,7 +1364,7 @@ composition_reseat_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_I int composition_update_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, Lisp_Object string) { - int i, c; + int i, c IF_LINT (= 0); if (cmp_it->ch < 0) { From 8e52e652078cbaa3588c3fe034e076773fee04ce Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 18:02:49 -0700 Subject: [PATCH 023/166] * composite.c (find_automatic_composition): Mark vars as initialized, with a FIXME. --- src/ChangeLog | 1 + src/composite.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index ca10b31305d..f856a24fbdd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,7 @@ (composition_reseat_it): Remove unused locals. (find_automatic_composition, composition_adjust_point): Likewise. (composition_update_it): Mark var as initialized. + (find_automatic_composition): Mark vars as initialized, with a FIXME. 2011-03-18 Paul Eggert diff --git a/src/composite.c b/src/composite.c index ee2e843b729..bc5644a4612 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1489,7 +1489,13 @@ find_automatic_composition (EMACS_INT pos, EMACS_INT limit, EMACS_INT *start, EM EMACS_INT head, tail, stop; /* Limit to check a composition after POS. */ EMACS_INT fore_check_limit; - struct position_record orig, cur, check, prev; + struct position_record orig, cur; + + /* FIXME: It's not obvious whether these two variables need initialization. + If they do, please supply initial values. + If not, please remove this comment. */ + struct position_record check IF_LINT (= {0}), prev IF_LINT (= {0}); + Lisp_Object check_val, val, elt; int c; Lisp_Object window; From 11b61122218efde0ffa175c2635f99570a62d1e3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 19:42:49 -0700 Subject: [PATCH 024/166] Add Bug#. --- src/ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index f856a24fbdd..70f3daa10d3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,7 +5,8 @@ (composition_reseat_it): Remove unused locals. (find_automatic_composition, composition_adjust_point): Likewise. (composition_update_it): Mark var as initialized. - (find_automatic_composition): Mark vars as initialized, with a FIXME. + (find_automatic_composition): Mark vars as initialized, + with a FIXME (Bug#8290). 2011-03-18 Paul Eggert From c9735e30cac759cd796d6b6eb2d41b4d46894a08 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 19:43:47 -0700 Subject: [PATCH 025/166] * xml.c (make_dom): Now static. --- src/ChangeLog | 2 ++ src/xml.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 70f3daa10d3..dbf5c94a87c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-19 Paul Eggert + * xml.c (make_dom): Now static. + * composite.c (composition_compute_stop_pos): Rename local to avoid shadowing. (composition_reseat_it): Remove unused locals. diff --git a/src/xml.c b/src/xml.c index 12ef14e6b9f..d8e6f8c3faa 100644 --- a/src/xml.c +++ b/src/xml.c @@ -28,7 +28,8 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "buffer.h" -Lisp_Object make_dom (xmlNode *node) +static Lisp_Object +make_dom (xmlNode *node) { if (node->type == XML_ELEMENT_NODE) { From e2be39f6afd7c24f3436740711fd1aeeb3fce3df Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 19:45:11 -0700 Subject: [PATCH 026/166] * xfont.c (xfont_list_family): Mark var as initialized. --- src/ChangeLog | 2 ++ src/xfont.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index dbf5c94a87c..b242465cef3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-19 Paul Eggert + * xfont.c (xfont_list_family): Mark var as initialized. + * xml.c (make_dom): Now static. * composite.c (composition_compute_stop_pos): Rename local to diff --git a/src/xfont.c b/src/xfont.c index f8aace3663c..3e0fcd2cd75 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -629,7 +629,7 @@ xfont_list_family (Lisp_Object frame) char **names; int num_fonts, i; Lisp_Object list; - char *last_family; + char *last_family IF_LINT (= 0); int last_len; BLOCK_INPUT; From 8ff096c18cc923d5f3b936311d837edd91d8fbe9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 19:49:10 -0700 Subject: [PATCH 027/166] * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness. --- src/ChangeLog | 2 ++ src/ftfont.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index b242465cef3..26833532ca4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-19 Paul Eggert + * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness. + * xfont.c (xfont_list_family): Mark var as initialized. * xml.c (make_dom): Now static. diff --git a/src/ftfont.c b/src/ftfont.c index db6b29421dc..0c3e7bb6428 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -311,8 +311,9 @@ ftfont_resolve_generic_family (Lisp_Object family, FcPattern *pattern) if (FcPatternGetLangSet (pattern, FC_LANG, 0, &langset) != FcResultMatch) { /* This is to avoid the effect of locale. */ + static const FcChar8 lang[] = "en"; langset = FcLangSetCreate (); - FcLangSetAdd (langset, "en"); + FcLangSetAdd (langset, lang); FcPatternAddLangSet (pattern, FC_LANG, langset); FcLangSetDestroy (langset); } From a00924bbcef7baa794fc1368d81bccd8931ae055 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 21:56:15 -0700 Subject: [PATCH 028/166] * ftfont.c (ftfont_otf_capability, ftfont_shape): Omit decls if not needed. (OTF_TAG_SYM): Omit macro if not needed. --- src/ChangeLog | 2 ++ src/ftfont.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 26833532ca4..6ad69b657b8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,8 @@ 2011-03-19 Paul Eggert * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness. + (ftfont_otf_capability, ftfont_shape): Omit decls if not needed. + (OTF_TAG_SYM): Omit macro if not needed. * xfont.c (xfont_list_family): Mark var as initialized. diff --git a/src/ftfont.c b/src/ftfont.c index 0c3e7bb6428..5decec16825 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -491,8 +491,12 @@ static int ftfont_get_bitmap (struct font *, unsigned, struct font_bitmap *, int); static int ftfont_anchor_point (struct font *, unsigned, int, int *, int *); +#ifdef HAVE_LIBOTF static Lisp_Object ftfont_otf_capability (struct font *); +# ifdef HAVE_M17N_FLT static Lisp_Object ftfont_shape (Lisp_Object); +# endif +#endif #ifdef HAVE_OTF_GET_VARIATION_GLYPHS static int ftfont_variation_glyphs (struct font *, int c, @@ -619,6 +623,7 @@ struct OpenTypeSpec (P)[4] = '\0'; \ } while (0) +#ifdef HAVE_LIBOTF #define OTF_TAG_SYM(SYM, TAG) \ do { \ char str[5]; \ @@ -626,6 +631,7 @@ struct OpenTypeSpec OTF_TAG_STR (TAG, str); \ (SYM) = font_intern_prop (str, 4, 1); \ } while (0) +#endif static struct OpenTypeSpec * From e932860f4b4ecee35ae0f69f8c3082f5d32ef193 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 21:57:02 -0700 Subject: [PATCH 029/166] * ftfont.c (ftfont_list): Remove unused local. --- src/ChangeLog | 1 + src/ftfont.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6ad69b657b8..5ec2d88ea90 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness. (ftfont_otf_capability, ftfont_shape): Omit decls if not needed. (OTF_TAG_SYM): Omit macro if not needed. + (ftfont_list): Remove unused local. * xfont.c (xfont_list_family): Mark var as initialized. diff --git a/src/ftfont.c b/src/ftfont.c index 5decec16825..28042bb9c66 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -871,7 +871,6 @@ ftfont_list (Lisp_Object frame, Lisp_Object spec) FcObjectSet *objset = NULL; FcCharSet *charset; Lisp_Object chars = Qnil; - FcResult result; char otlayout[15]; /* For "otlayout:XXXX" */ struct OpenTypeSpec *otspec = NULL; int spacing = -1; From 49eaafbac1695d9244329b3518309bfcc1a98aa4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 22:03:30 -0700 Subject: [PATCH 030/166] * ftfont.c: (get_adstyle_property, ftfont_pattern_entity): (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point): Rename locals to avoid shadowing. --- src/ChangeLog | 3 +++ src/ftfont.c | 39 ++++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5ec2d88ea90..ec9f513b045 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,9 @@ (ftfont_otf_capability, ftfont_shape): Omit decls if not needed. (OTF_TAG_SYM): Omit macro if not needed. (ftfont_list): Remove unused local. + (get_adstyle_property, ftfont_pattern_entity): + (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point): + Rename locals to avoid shadowing. * xfont.c (xfont_list_family): Mark var as initialized. diff --git a/src/ftfont.c b/src/ftfont.c index 28042bb9c66..ad01149106e 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -168,11 +168,11 @@ get_adstyle_property (FcPattern *p) for (end = str; *end && *end != ' '; end++); if (*end) { - char *p = alloca (end - str + 1); - memcpy (p, str, end - str); - p[end - str] = '\0'; - end = p + (end - str); - str = p; + char *newstr = alloca (end - str + 1); + memcpy (newstr, str, end - str); + newstr[end - str] = '\0'; + end = newstr + (end - str); + str = newstr; } if (xstrcasecmp (str, "Regular") == 0 || xstrcasecmp (str, "Bold") == 0 @@ -190,18 +190,18 @@ ftfont_pattern_entity (FcPattern *p, Lisp_Object extra) { Lisp_Object key, cache, entity; char *file, *str; - int index; + int idx; int numeric; double dbl; FcBool b; if (FcPatternGetString (p, FC_FILE, 0, (FcChar8 **) &file) != FcResultMatch) return Qnil; - if (FcPatternGetInteger (p, FC_INDEX, 0, &index) != FcResultMatch) + if (FcPatternGetInteger (p, FC_INDEX, 0, &idx) != FcResultMatch) return Qnil; key = Fcons (make_unibyte_string ((char *) file, strlen ((char *) file)), - make_number (index)); + make_number (idx)); cache = ftfont_lookup_cache (key, FTFONT_CACHE_FOR_ENTITY); entity = XCAR (cache); if (! NILP (entity)) @@ -265,7 +265,7 @@ ftfont_pattern_entity (FcPattern *p, Lisp_Object extra) ASET (entity, FONT_ADSTYLE_INDEX, get_adstyle_property (p)); if ((ft_library || FT_Init_FreeType (&ft_library) == 0) - && FT_New_Face (ft_library, file, index, &ft_face) == 0) + && FT_New_Face (ft_library, file, idx, &ft_face) == 0) { BDF_PropertyRec rec; @@ -394,14 +394,14 @@ ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for) ? ! cache_data->ft_face : ! cache_data->fc_charset) { char *filename = SSDATA (XCAR (key)); - int index = XINT (XCDR (key)); + int idx = XINT (XCDR (key)); if (cache_for == FTFONT_CACHE_FOR_FACE) { if (! ft_library && FT_Init_FreeType (&ft_library) != 0) return Qnil; - if (FT_New_Face (ft_library, filename, index, &cache_data->ft_face) + if (FT_New_Face (ft_library, filename, idx, &cache_data->ft_face) != 0) return Qnil; } @@ -413,7 +413,7 @@ ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for) FcCharSet *charset = NULL; pat = FcPatternBuild (0, FC_FILE, FcTypeString, (FcChar8 *) filename, - FC_INDEX, FcTypeInteger, index, NULL); + FC_INDEX, FcTypeInteger, idx, NULL); if (! pat) goto finish; objset = FcObjectSetBuild (FC_CHARSET, FC_STYLE, NULL); @@ -1159,7 +1159,7 @@ ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) FT_Face ft_face; FT_Size ft_size; FT_UInt size; - Lisp_Object val, filename, index, cache, font_object; + Lisp_Object val, filename, idx, cache, font_object; int scalable; int spacing; char name[256]; @@ -1174,7 +1174,7 @@ ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) if (NILP (cache)) return Qnil; filename = XCAR (val); - index = XCDR (val); + idx = XCDR (val); val = XCDR (cache); cache_data = XSAVE_VALUE (XCDR (cache))->pointer; ft_face = cache_data->ft_face; @@ -1216,7 +1216,7 @@ ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) font = XFONT_OBJECT (font_object); ftfont_info = (struct ftfont_info *) font; ftfont_info->ft_size = ft_face->size; - ftfont_info->index = XINT (index); + ftfont_info->index = XINT (idx); #ifdef HAVE_LIBOTF ftfont_info->maybe_otf = ft_face->face_flags & FT_FACE_FLAG_SFNT; ftfont_info->otf = NULL; @@ -1461,7 +1461,8 @@ ftfont_get_bitmap (struct font *font, unsigned int code, struct font_bitmap *bit } static int -ftfont_anchor_point (struct font *font, unsigned int code, int index, int *x, int *y) +ftfont_anchor_point (struct font *font, unsigned int code, int idx, + int *x, int *y) { struct ftfont_info *ftfont_info = (struct ftfont_info *) font; FT_Face ft_face = ftfont_info->ft_size->face; @@ -1472,10 +1473,10 @@ ftfont_anchor_point (struct font *font, unsigned int code, int index, int *x, in return -1; if (ft_face->glyph->format != FT_GLYPH_FORMAT_OUTLINE) return -1; - if (index >= ft_face->glyph->outline.n_points) + if (idx >= ft_face->glyph->outline.n_points) return -1; - *x = ft_face->glyph->outline.points[index].x; - *y = ft_face->glyph->outline.points[index].y; + *x = ft_face->glyph->outline.points[idx].x; + *y = ft_face->glyph->outline.points[idx].y; return 0; } From 0248044d313959dd87d64438fa297ca25adfc9ac Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 22:05:19 -0700 Subject: [PATCH 031/166] * xftfont.c (xftfont_shape): Now static, and defined only if needed. --- src/ChangeLog | 2 ++ src/xftfont.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index ec9f513b045..ef0999b8454 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-19 Paul Eggert + * xftfont.c (xftfont_shape): Now static, and defined only if needed. + * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness. (ftfont_otf_capability, ftfont_shape): Omit decls if not needed. (OTF_TAG_SYM): Omit macro if not needed. diff --git a/src/xftfont.c b/src/xftfont.c index 695527c4236..7c8b5dde070 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -672,7 +672,8 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b return len; } -Lisp_Object +#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF +static Lisp_Object xftfont_shape (Lisp_Object lgstring) { struct font *font; @@ -688,6 +689,7 @@ xftfont_shape (Lisp_Object lgstring) XftUnlockFace (xftfont_info->xftfont); return val; } +#endif static int xftfont_end_for_frame (FRAME_PTR f) From 001a7ab41b79b45c0c6a1b5b90fe4ed9bbfe4e14 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 22:07:42 -0700 Subject: [PATCH 032/166] * xftfont.c (xftfont_open): Rename locals to avoid shadowing. --- src/ChangeLog | 1 + src/xftfont.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ef0999b8454..37534dc6c64 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-19 Paul Eggert * xftfont.c (xftfont_shape): Now static, and defined only if needed. + (xftfont_open): Rename locals to avoid shadowing. * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness. (ftfont_otf_capability, ftfont_shape): Omit decls if not needed. diff --git a/src/xftfont.c b/src/xftfont.c index 7c8b5dde070..c27a4fcf91a 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -280,7 +280,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) { FcResult result; Display *display = FRAME_X_DISPLAY (f); - Lisp_Object val, filename, index, font_object; + Lisp_Object val, filename, idx, font_object; FcPattern *pat = NULL, *match; struct xftfont_info *xftfont_info = NULL; struct font *font; @@ -298,7 +298,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) return Qnil; val = XCDR (val); filename = XCAR (val); - index = XCDR (val); + idx = XCDR (val); size = XINT (AREF (entity, FONT_SIZE_INDEX)); if (size == 0) size = pixel_size; @@ -335,7 +335,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) xftfont_add_rendering_parameters (pat, entity); FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename)); - FcPatternAddInteger (pat, FC_INDEX, XINT (index)); + FcPatternAddInteger (pat, FC_INDEX, XINT (idx)); BLOCK_INPUT; @@ -409,9 +409,9 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) spacing = FC_PROPORTIONAL; if (! ascii_printable[0]) { - int i; - for (i = 0; i < 95; i++) - ascii_printable[i] = ' ' + i; + int ch; + for (ch = 0; ch < 95; ch++) + ascii_printable[ch] = ' ' + ch; } BLOCK_INPUT; if (spacing != FC_PROPORTIONAL From af8a867c625d0ba45177795dea995a842b22e5f6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 19 Mar 2011 15:46:50 -0700 Subject: [PATCH 033/166] Make tparam.h and terminfo.c consistent. * cm.c (tputs, tgoto, BC, UP): Remove extern decls. Include tparam.h instead, since it declares them. * cm.h (PC): Remove extern decl; tparam.h now does this. * deps.mk (cm.o, terminfo.o): Depend on tparam.h. * terminfo.c: Include tparam.h, to check interfaces. (tparm): Make 1st arg a const pointer in decl. Put it at top level. (tparam): Adjust signature to match interface in tparam.h; this removes some undefined behavior. Check that outstring and len are zero, which they always are with Emacs. * tparam.h (PC, BC, UP): New extern decls. --- src/ChangeLog | 12 ++++++++++++ src/cm.c | 10 +--------- src/cm.h | 2 -- src/deps.mk | 4 ++-- src/terminfo.c | 23 +++++++++++++---------- src/tparam.h | 4 ++++ 6 files changed, 32 insertions(+), 23 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 37534dc6c64..841f4ee69dc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,17 @@ 2011-03-19 Paul Eggert + Make tparam.h and terminfo.c consistent. + * cm.c (tputs, tgoto, BC, UP): Remove extern decls. Include + tparam.h instead, since it declares them. + * cm.h (PC): Remove extern decl; tparam.h now does this. + * deps.mk (cm.o, terminfo.o): Depend on tparam.h. + * terminfo.c: Include tparam.h, to check interfaces. + (tparm): Make 1st arg a const pointer in decl. Put it at top level. + (tparam): Adjust signature to match interface in tparam.h; + this removes some undefined behavior. Check that outstring and len + are zero, which they always are with Emacs. + * tparam.h (PC, BC, UP): New extern decls. + * xftfont.c (xftfont_shape): Now static, and defined only if needed. (xftfont_open): Rename locals to avoid shadowing. diff --git a/src/cm.c b/src/cm.c index 108ee5720f3..6379955b48c 100644 --- a/src/cm.c +++ b/src/cm.c @@ -27,19 +27,11 @@ along with GNU Emacs. If not, see . */ #include "cm.h" #include "termhooks.h" #include "termchar.h" - - -/* For now, don't try to include termcap.h. On some systems, - configure finds a non-standard termcap.h that the main build - won't find. */ -extern void tputs (const char *, int, int (*)(int)); -extern char *tgoto (const char *, int, int); +#include "tparam.h" #define BIG 9999 /* 9999 good on VAXen. For 16 bit machines use about 2000.... */ -extern char *BC, *UP; - int cost; /* sums up costs */ /* ARGSUSED */ diff --git a/src/cm.h b/src/cm.h index 5d430598f0c..8f23990ce55 100644 --- a/src/cm.h +++ b/src/cm.h @@ -96,8 +96,6 @@ struct cm int cc_vabs; }; -extern char PC; /* Pad character */ - /* Shorthand */ #ifndef NoCMShortHand #define curY(tty) (tty)->Wcm->cm_curY diff --git a/src/deps.mk b/src/deps.mk index 35754dfa7de..d84e80dca44 100644 --- a/src/deps.mk +++ b/src/deps.mk @@ -65,7 +65,7 @@ coding.o: coding.c coding.h ccl.h buffer.h character.h charset.h composite.h \ window.h dispextern.h msdos.h frame.h termhooks.h \ lisp.h globals.h $(config_h) cm.o: cm.c frame.h cm.h termhooks.h termchar.h dispextern.h msdos.h \ - lisp.h globals.h $(config_h) + tparam.h lisp.h globals.h $(config_h) cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h lisp.h \ globals.h $(config_h) msdos.h dispextern.h keyboard.h keymap.h systime.h \ coding.h frame.h composite.h @@ -196,7 +196,7 @@ termcap.o: termcap.c lisp.h tparam.h msdos.h $(config_h) terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \ keyboard.h lisp.h globals.h $(config_h) dispextern.h composite.h systime.h \ msdos.h -terminfo.o: terminfo.c lisp.h globals.h $(config_h) +terminfo.o: terminfo.c tparam.h lisp.h globals.h $(config_h) tparam.o: tparam.c tparam.h lisp.h $(config_h) undo.o: undo.c buffer.h commands.h window.h dispextern.h msdos.h \ lisp.h globals.h $(config_h) diff --git a/src/terminfo.c b/src/terminfo.c index 905a8edacc7..c0418984efa 100644 --- a/src/terminfo.c +++ b/src/terminfo.c @@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ #include +#include "tparam.h" + #include #include "lisp.h" @@ -33,18 +35,19 @@ char *UP, *BC, PC; format is different too. */ +extern char *tparm (const char *str, ...); + + char * -tparam (char *string, char *outstring, - int len, int arg1, int arg2, int arg3, int arg4, - int arg5, int arg6, int arg7, int arg8, int arg9) +tparam (const char *string, char *outstring, int len, + int arg1, int arg2, int arg3, int arg4) { char *temp; - extern char *tparm (char *str, ...); - temp = tparm (string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); - if (outstring == 0) - outstring = ((char *) (xmalloc ((strlen (temp)) + 1))); - strcpy (outstring, temp); - return outstring; + /* Emacs always should pass a null OUTSTRING and zero LEN. */ + if (outstring || len) + abort (); + + temp = tparm (string, arg1, arg2, arg3, arg4); + return xstrdup (temp); } - diff --git a/src/tparam.h b/src/tparam.h index 3cd3e6053cc..dc4cdfaa28c 100644 --- a/src/tparam.h +++ b/src/tparam.h @@ -29,3 +29,7 @@ char *tgetstr (const char *, char **); char *tgoto (const char *, int, int); char *tparam (const char *, char *, int, int, int, int, int); + +extern char PC; +extern char *BC; +extern char *UP; From b93aacde821363e25f86bad302cc2a8c32ff82ac Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 19 Mar 2011 19:40:14 -0700 Subject: [PATCH 034/166] * process.c: Rename or move locals to avoid shadowing. (list_processes_1, Fmake_network_process): (read_process_output_error_handler, exec_sentinel_error_handler): Rename or move locals. --- src/ChangeLog | 7 +++++++ src/process.c | 40 ++++++++++++++++++++-------------------- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 841f4ee69dc..df1c683b4eb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-03-20 Paul Eggert + + * process.c: Rename or move locals to avoid shadowing. + (list_processes_1, Fmake_network_process): + (read_process_output_error_handler, exec_sentinel_error_handler): + Rename or move locals. + 2011-03-19 Paul Eggert Make tparam.h and terminfo.c consistent. diff --git a/src/process.c b/src/process.c index c9b420ab2ae..952bc8e23da 100644 --- a/src/process.c +++ b/src/process.c @@ -1250,8 +1250,8 @@ Returns nil if format of ADDRESS is invalid. */) static Lisp_Object list_processes_1 (Lisp_Object query_only) { - register Lisp_Object tail, tem; - Lisp_Object proc, minspace, tem1; + register Lisp_Object tail; + Lisp_Object proc, minspace; register struct Lisp_Process *p; char tembuf[300]; int w_proc, w_buffer, w_tty; @@ -1453,10 +1453,10 @@ list_processes_1 (Lisp_Object query_only) } else { - tem = p->command; + Lisp_Object tem = p->command; while (1) { - tem1 = Fcar (tem); + Lisp_Object tem1 = Fcar (tem); if (NILP (tem1)) break; Finsert (1, &tem1); @@ -3705,10 +3705,10 @@ usage: (make-network-process &rest ARGS) */) { /* Setup coding systems for communicating with the network stream. */ - struct gcpro gcpro1; + struct gcpro inner_gcpro1; /* Qt denotes we have not yet called Ffind_operation_coding_system. */ Lisp_Object coding_systems = Qt; - Lisp_Object args[5], val; + Lisp_Object fargs[5], val; if (!NILP (tem)) { @@ -3731,11 +3731,11 @@ usage: (make-network-process &rest ARGS) */) coding_systems = Qnil; else { - args[0] = Qopen_network_stream, args[1] = name, - args[2] = buffer, args[3] = host, args[4] = service; - GCPRO1 (proc); - coding_systems = Ffind_operation_coding_system (5, args); - UNGCPRO; + fargs[0] = Qopen_network_stream, fargs[1] = name, + fargs[2] = buffer, fargs[3] = host, fargs[4] = service; + GCPRO1_VAR (proc, inner_gcpro); + coding_systems = Ffind_operation_coding_system (5, fargs); + UNGCPRO_VAR (inner_gcpro); } if (CONSP (coding_systems)) val = XCAR (coding_systems); @@ -3764,11 +3764,11 @@ usage: (make-network-process &rest ARGS) */) coding_systems = Qnil; else { - args[0] = Qopen_network_stream, args[1] = name, - args[2] = buffer, args[3] = host, args[4] = service; - GCPRO1 (proc); - coding_systems = Ffind_operation_coding_system (5, args); - UNGCPRO; + fargs[0] = Qopen_network_stream, fargs[1] = name, + fargs[2] = buffer, fargs[3] = host, fargs[4] = service; + GCPRO1_VAR (proc, inner_gcpro); + coding_systems = Ffind_operation_coding_system (5, fargs); + UNGCPRO_VAR (inner_gcpro); } } if (CONSP (coding_systems)) @@ -5128,9 +5128,9 @@ read_process_output_call (Lisp_Object fun_and_args) } static Lisp_Object -read_process_output_error_handler (Lisp_Object error) +read_process_output_error_handler (Lisp_Object error_val) { - cmd_error_internal (error, "error in process filter: "); + cmd_error_internal (error_val, "error in process filter: "); Vinhibit_quit = Qt; update_echo_area (); Fsleep_for (make_number (2), Qnil); @@ -6534,9 +6534,9 @@ exec_sentinel_unwind (Lisp_Object data) } static Lisp_Object -exec_sentinel_error_handler (Lisp_Object error) +exec_sentinel_error_handler (Lisp_Object error_val) { - cmd_error_internal (error, "error in process sentinel: "); + cmd_error_internal (error_val, "error in process sentinel: "); Vinhibit_quit = Qt; update_echo_area (); Fsleep_for (make_number (2), Qnil); From 4dc343ee3651cfefa2091788f4749a71ccbe741b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 19 Mar 2011 19:41:23 -0700 Subject: [PATCH 035/166] * process.c (Fmake_network_process): Define label "retry_connect" only if needed. --- src/ChangeLog | 1 + src/process.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index df1c683b4eb..41cf56e47f0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,7 @@ (list_processes_1, Fmake_network_process): (read_process_output_error_handler, exec_sentinel_error_handler): Rename or move locals. + (Fmake_network_process): Define label "retry_connect" only if needed. 2011-03-19 Paul Eggert diff --git a/src/process.c b/src/process.c index 952bc8e23da..fb6dc95bb31 100644 --- a/src/process.c +++ b/src/process.c @@ -3403,7 +3403,9 @@ usage: (make-network-process &rest ARGS) */) { int optn, optbits; +#ifdef WINDOWSNT retry_connect: +#endif s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol); if (s < 0) From 0da4933597401742827d31c66836082c1ee70875 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 19 Mar 2011 19:42:34 -0700 Subject: [PATCH 036/166] * process.c (Fnetwork_interface_info): Fix pointer signedness. --- src/ChangeLog | 1 + src/process.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 41cf56e47f0..12a70ce9575 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,7 @@ (read_process_output_error_handler, exec_sentinel_error_handler): Rename or move locals. (Fmake_network_process): Define label "retry_connect" only if needed. + (Fnetwork_interface_info): Fix pointer signedness. 2011-03-19 Paul Eggert diff --git a/src/process.c b/src/process.c index fb6dc95bb31..3cdf045f4f4 100644 --- a/src/process.c +++ b/src/process.c @@ -3950,7 +3950,7 @@ FLAGS is the current flags of the interface. */) CHECK_STRING (ifname); memset (rq.ifr_name, 0, sizeof rq.ifr_name); - strncpy (rq.ifr_name, SDATA (ifname), sizeof (rq.ifr_name)); + strncpy (rq.ifr_name, SSDATA (ifname), sizeof (rq.ifr_name)); s = socket (AF_INET, SOCK_STREAM, 0); if (s < 0) From f990b4e5d91b66e20f06cc0dab0b3f0ab97c3f91 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 19 Mar 2011 19:45:19 -0700 Subject: [PATCH 037/166] * process.c (process_send_signal): Add cast to avoid pointer signedness problem. --- src/ChangeLog | 1 + src/process.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 12a70ce9575..fa0ff89e5f7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -6,6 +6,7 @@ Rename or move locals. (Fmake_network_process): Define label "retry_connect" only if needed. (Fnetwork_interface_info): Fix pointer signedness. + (process_send_signal): Add cast to avoid pointer signedness problem. 2011-03-19 Paul Eggert diff --git a/src/process.c b/src/process.c index 3cdf045f4f4..ae7ec158ef9 100644 --- a/src/process.c +++ b/src/process.c @@ -5927,7 +5927,7 @@ process_send_signal (Lisp_Object process, int signo, Lisp_Object current_group, if (sig_char && *sig_char != CDISABLE) { - send_process (proc, sig_char, 1, Qnil); + send_process (proc, (char *) sig_char, 1, Qnil); return; } /* If we can't send the signal with a character, From 7b8081265e19732eb3e0defde970e1ccfad5fbcc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 19 Mar 2011 19:48:50 -0700 Subject: [PATCH 038/166] * process.c (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros. --- src/ChangeLog | 1 + src/process.c | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index fa0ff89e5f7..041d4b21754 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,7 @@ (Fmake_network_process): Define label "retry_connect" only if needed. (Fnetwork_interface_info): Fix pointer signedness. (process_send_signal): Add cast to avoid pointer signedness problem. + (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros. 2011-03-19 Paul Eggert diff --git a/src/process.c b/src/process.c index ae7ec158ef9..5bc1707756b 100644 --- a/src/process.c +++ b/src/process.c @@ -159,9 +159,6 @@ extern Lisp_Object QCfilter; #define SERIALCONN_P(p) (EQ (XPROCESS (p)->type, Qserial)) #define SERIALCONN1_P(p) (EQ ((p)->type, Qserial)) -/* Define first descriptor number available for subprocesses. */ -#define FIRST_PROC_DESC 3 - #ifndef HAVE_H_ERRNO extern int h_errno; #endif @@ -278,10 +275,6 @@ static SELECT_TYPE connect_wait_mask; /* Number of bits set in connect_wait_mask. */ static int num_pending_connects; - -#define IF_NON_BLOCKING_CONNECT(s) s -#else /* NON_BLOCKING_CONNECT */ -#define IF_NON_BLOCKING_CONNECT(s) #endif /* NON_BLOCKING_CONNECT */ /* The largest descriptor currently in use for a process object. */ @@ -4930,8 +4923,6 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, d->func (channel, d->data, 0); } - /* Really FIRST_PROC_DESC should be 0 on Unix, - but this is safer in the short run. */ for (channel = 0; channel <= max_process_desc; channel++) { if (FD_ISSET (channel, &Available) From 12d8b6ab59c4a70a7af46361dc4ff05308982a54 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 19 Mar 2011 20:07:54 -0700 Subject: [PATCH 039/166] * process.c (create_process): Use 'volatile' to avoid vfork clobbering. --- src/ChangeLog | 1 + src/process.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 041d4b21754..bc306f20578 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,6 +8,7 @@ (Fnetwork_interface_info): Fix pointer signedness. (process_send_signal): Add cast to avoid pointer signedness problem. (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros. + (create_process): Use 'volatile' to avoid vfork clobbering. 2011-03-19 Paul Eggert diff --git a/src/process.c b/src/process.c index 5bc1707756b..5ee731a5bd3 100644 --- a/src/process.c +++ b/src/process.c @@ -1912,8 +1912,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) /* child_setup must clobber environ on systems with true vfork. Protect it from permanent change. */ char **save_environ = environ; - - current_dir = ENCODE_FILE (current_dir); + volatile Lisp_Object encoded_current_dir = ENCODE_FILE (current_dir); #ifndef WINDOWSNT pid = vfork (); @@ -2054,13 +2053,13 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) child_setup_tty (xforkout); #ifdef WINDOWSNT pid = child_setup (xforkin, xforkout, xforkout, - new_argv, 1, current_dir); + new_argv, 1, encoded_current_dir); #else /* not WINDOWSNT */ #ifdef FD_CLOEXEC emacs_close (wait_child_setup[0]); #endif child_setup (xforkin, xforkout, xforkout, - new_argv, 1, current_dir); + new_argv, 1, encoded_current_dir); #endif /* not WINDOWSNT */ } environ = save_environ; From c939f91b4d9d7830daf4e17cacbab1709ce9949d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 19 Mar 2011 22:15:59 -0700 Subject: [PATCH 040/166] Add Bug#8298. --- src/ChangeLog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bc306f20578..744d3ef53f0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,7 +8,7 @@ (Fnetwork_interface_info): Fix pointer signedness. (process_send_signal): Add cast to avoid pointer signedness problem. (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros. - (create_process): Use 'volatile' to avoid vfork clobbering. + (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298). 2011-03-19 Paul Eggert @@ -75,7 +75,8 @@ * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes. - * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering. + * callproc.c (Fcall_process): Use 'volatile' to avoid vfork + clobbering (Bug#8298). * sysdep.c (sys_subshell): Likewise. Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out. From 6a90a4f1982c25213ec70637b52462674c2564bd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 20 Mar 2011 09:28:22 -0700 Subject: [PATCH 041/166] Merge from gnulib, for socklen_t. --- configure | 29 ++++++++++++++++++++++---- m4/socklen.m4 | 58 +++++++++++++++++++++++++++++++-------------------- src/config.in | 3 +++ 3 files changed, 63 insertions(+), 27 deletions(-) diff --git a/configure b/configure index eed1c70599e..e51bb0c1a57 100755 --- a/configure +++ b/configure @@ -14777,6 +14777,20 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_header_sys_socket_h = no; then + for ac_header in ws2tcpip.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" +if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WS2TCPIP_H 1 +_ACEOF + +fi + +done + + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } @@ -16351,10 +16365,17 @@ $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h # Code from module socklen: - ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include - #if HAVE_SYS_SOCKET_H - # include - #endif + ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " +/* is not needed according to POSIX, but the + in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#if HAVE_SYS_SOCKET_H +# include +#elif HAVE_WS2TCPIP_H +# include +#endif + " if test "x$ac_cv_type_socklen_t" = xyes; then : diff --git a/m4/socklen.m4 b/m4/socklen.m4 index 28dcf070463..44751544485 100644 --- a/m4/socklen.m4 +++ b/m4/socklen.m4 @@ -1,4 +1,4 @@ -# socklen.m4 serial 9 +# socklen.m4 serial 10 dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,15 +9,11 @@ dnl From Albert Chin, Windows fixes from Simon Josefsson. dnl Check for socklen_t: historically on BSD it is an int, and in dnl POSIX 1g it is a type of its own, but some platforms use different dnl types for the argument to getsockopt, getpeername, etc.: -dnl HP-UX 10.20, IRIX 6.5, Interix 3.5, BeOS. +dnl HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS. dnl So we have to test to find something that will work. -dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find -dnl it there first. That file is included by gnulib's sys_socket.in.h, which -dnl all users of this module should include if they want to be portable to -dnl mingw32. Cygwin must not include ws2tcpip.h. AC_DEFUN([gl_TYPE_SOCKLEN_T], - [AC_REQUIRE([gl_PREREQ_TYPE_SOCKLEN_T])dnl + [AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])dnl AC_CHECK_TYPE([socklen_t], , [AC_MSG_CHECKING([for socklen_t equivalent]) AC_CACHE_VAL([gl_cv_socklen_t_equiv], @@ -45,21 +41,37 @@ AC_DEFUN([gl_TYPE_SOCKLEN_T], AC_MSG_RESULT([$gl_cv_socklen_t_equiv]) AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv], [type to use in place of socklen_t if not defined])], - [#include - #if HAVE_SYS_SOCKET_H - # include - ]m4_ifdef([gl_SYS_SOCKET_H_DEFAULTS], - [#elif HAVE_WS2TCPIP_H - # include ] - )[#endif])]) + [gl_SOCKET_HEADERS])]) -AC_DEFUN([gl_PREREQ_TYPE_SOCKLEN_T], +dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find +dnl it there too. But on Cygwin, wc2tcpip.h must not be included. Users +dnl of this module should use the same include pattern as gl_SOCKET_HEADERS. +dnl When you change this macro, keep also in sync: +dnl - gl_CHECK_SOCKET_HEADERS, +dnl - the Include section of modules/socklen. +AC_DEFUN([gl_SOCKET_HEADERS], +[ +/* is not needed according to POSIX, but the + in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#if HAVE_SYS_SOCKET_H +# include +#elif HAVE_WS2TCPIP_H +# include +#endif +]) + +dnl Tests for the existence of the header for socket facilities. +dnl Defines the C macros HAVE_SYS_SOCKET_H, HAVE_WS2TCPIP_H. +dnl This macro must match gl_SOCKET_HEADERS. +AC_DEFUN([gl_CHECK_SOCKET_HEADERS], [AC_CHECK_HEADERS_ONCE([sys/socket.h]) - m4_ifdef([gl_SYS_SOCKET_H_DEFAULTS], - [if test $ac_cv_header_sys_socket_h = no; then - dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make - dnl the check for those headers unconditional; yet cygwin reports - dnl that the headers are present but cannot be compiled (since on - dnl cygwin, all socket information should come from sys/socket.h). - AC_CHECK_HEADERS([ws2tcpip.h]) - fi])]) + if test $ac_cv_header_sys_socket_h = no; then + dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make + dnl the check for those headers unconditional; yet cygwin reports + dnl that the headers are present but cannot be compiled (since on + dnl cygwin, all socket information should come from sys/socket.h). + AC_CHECK_HEADERS([ws2tcpip.h]) + fi + ]) diff --git a/src/config.in b/src/config.in index 8b7312faaaa..b24aacd4e54 100644 --- a/src/config.in +++ b/src/config.in @@ -833,6 +833,9 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK +/* Define to 1 if you have the header file. */ +#undef HAVE_WS2TCPIP_H + /* Define to 1 if you want to use version 11 of X windows. Otherwise, Emacs expects to use version 10. */ #undef HAVE_X11 From dc1ca6a87f1e100a054b0e5eab64da30dc5cad6f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 20 Mar 2011 14:03:44 -0700 Subject: [PATCH 042/166] * emacs.c (Fdaemon_initialized): Do not ignore I/O errors. --- src/ChangeLog | 2 ++ src/emacs.c | 17 +++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0b2a0d44c5f..82213687708 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-20 Paul Eggert + * emacs.c (Fdaemon_initialized): Do not ignore I/O errors. + * process.c (Fmake_network_process): Use socklen_t, not int, where POSIX says socklen_t is required in portable programs. This fixes a porting bug on hosts like 64-bit HP-UX, where diff --git a/src/emacs.c b/src/emacs.c index 052f22ea622..bc7c07a9326 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2312,6 +2312,7 @@ from the parent process and its tty file descriptors. */) (void) { int nfd; + int err = 0; if (!IS_DAEMON) error ("This function can only be called if emacs is run as a daemon"); @@ -2324,10 +2325,11 @@ from the parent process and its tty file descriptors. */) /* Get rid of stdin, stdout and stderr. */ nfd = open ("/dev/null", O_RDWR); - dup2 (nfd, 0); - dup2 (nfd, 1); - dup2 (nfd, 2); - close (nfd); + err |= nfd < 0; + err |= dup2 (nfd, 0) < 0; + err |= dup2 (nfd, 1) < 0; + err |= dup2 (nfd, 2) < 0; + err |= close (nfd) != 0; /* Closing the pipe will notify the parent that it can exit. FIXME: In case some other process inherited the pipe, closing it here @@ -2336,10 +2338,13 @@ from the parent process and its tty file descriptors. */) Instead, we should probably close the pipe in start-process and call-process to make sure the pipe is never inherited by subprocesses. */ - write (daemon_pipe[1], "\n", 1); - close (daemon_pipe[1]); + err |= write (daemon_pipe[1], "\n", 1) < 0; + err |= close (daemon_pipe[1]) != 0; /* Set it to an invalid value so we know we've already run this function. */ daemon_pipe[1] = -1; + + if (err) + error ("I/O error during daemon initialization"); return Qt; } From 699979fc4c93ec11005da00e983af08078831e44 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 20 Mar 2011 16:56:23 -0700 Subject: [PATCH 043/166] Add Bug#. --- src/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 82213687708..c97331a78e5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,6 @@ 2011-03-20 Paul Eggert - * emacs.c (Fdaemon_initialized): Do not ignore I/O errors. + * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303). * process.c (Fmake_network_process): Use socklen_t, not int, where POSIX says socklen_t is required in portable programs. From 81e56e612dab7d80485c640068531710a713d205 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 20 Mar 2011 19:40:27 -0700 Subject: [PATCH 044/166] * fileio.c (Fcopy_file): Report error if fchown or fchmod fail. --- src/ChangeLog | 4 ++++ src/fileio.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c97331a78e5..fdf57152294 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-21 Paul Eggert + + * fileio.c (Fcopy_file): Report error if fchown or fchmod fail. + 2011-03-20 Paul Eggert * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303). diff --git a/src/fileio.c b/src/fileio.c index 5d33fb93878..7d2f10d517c 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1951,9 +1951,10 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */) owner and group. */ if (input_file_statable_p) { - if (! NILP (preserve_uid_gid)) - fchown (ofd, st.st_uid, st.st_gid); - fchmod (ofd, st.st_mode & 07777); + if (!NILP (preserve_uid_gid) && fchown (ofd, st.st_uid, st.st_gid) != 0) + report_file_error ("Doing chown", Fcons (newname, Qnil)); + if (fchmod (ofd, st.st_mode & 07777) != 0) + report_file_error ("Doing chmod", Fcons (newname, Qnil)); } #endif /* not MSDOS */ From d5cad867eca6beb34092cee18237cbc55100c946 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 20 Mar 2011 22:04:41 -0700 Subject: [PATCH 045/166] [ChangeLog] fakemail: Remove dependency on ignore-value. * Makefile.in (GNULIB_MODULES): Add stdio. * lib/stdio.in.h, m4/stdio_h.m4: New files, automatically imported from gnulib. [lib-src/ChangeLog] fakemail: Remove dependency on ignore-value. This undoes some of the recent fakemail-related changes. It is made possible due to recent changes to gnulib's stdio module. * Makefile.in (fakemail${EXEEXT}): Do not depend on ignore-value.h. * fakemail.c: Do not include ignore-value.h. (put_line): Do not use ignore_value. --- ChangeLog | 7 + Makefile.in | 2 +- lib-src/ChangeLog | 9 + lib-src/Makefile.in | 2 +- lib-src/fakemail.c | 4 +- lib/stdio.in.h | 1119 +++++++++++++++++++++++++++++++++++++++++++ m4/stdio_h.m4 | 140 ++++++ 7 files changed, 1278 insertions(+), 5 deletions(-) create mode 100644 lib/stdio.in.h create mode 100644 m4/stdio_h.m4 diff --git a/ChangeLog b/ChangeLog index a58a60465d4..ff0a79c2675 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-03-21 Paul Eggert + + fakemail: Remove dependency on ignore-value. + * Makefile.in (GNULIB_MODULES): Add stdio. + * lib/stdio.in.h, m4/stdio_h.m4: New files, automatically + imported from gnulib. + 2011-03-20 Glenn Morris * autogen/: New directory, to be excluded from releases. diff --git a/Makefile.in b/Makefile.in index 19267f82121..b165e3bba3b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -332,7 +332,7 @@ DOS_gnulib_comp.m4 = gl-comp.m4 # as per $(gnulib_srcdir)/DEPENDENCIES. GNULIB_MODULES = \ crypto/md5 dtoastr filemode getloadavg getopt-gnu \ - ignore-value intprops lstat mktime readlink strftime symlink sys_stat + ignore-value intprops lstat mktime readlink stdio strftime symlink sys_stat GNULIB_TOOL_FLAGS = \ --import --no-changelog --no-vc-files --makefile-name=gnulib.mk sync-from-gnulib: $(gnulib_srcdir) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index bd1a84cf0b9..cc713f0b68c 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,12 @@ +2011-03-21 Paul Eggert + + fakemail: Remove dependency on ignore-value. + This undoes some of the recent fakemail-related changes. + It is made possible due to recent changes to gnulib's stdio module. + * Makefile.in (fakemail${EXEEXT}): Do not depend on ignore-value.h. + * fakemail.c: Do not include ignore-value.h. + (put_line): Do not use ignore_value. + 2011-03-03 Drake Wilson (tiny change) * emacsclient.c (longopts): Add quiet. diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index d622233efb4..f671b0844ce 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -353,7 +353,7 @@ movemail.o: ${srcdir}/movemail.c ../src/config.h pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h ../src/config.h $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c -fakemail${EXEEXT}: ${srcdir}/fakemail.c ${srcdir}/../lib/ignore-value.h ../src/config.h +fakemail${EXEEXT}: ${srcdir}/fakemail.c ../src/config.h $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c index 780a104b405..940d6219425 100644 --- a/lib-src/fakemail.c +++ b/lib-src/fakemail.c @@ -62,8 +62,6 @@ main () /* This is to declare cuserid. */ #include - -#include /* Type definitions */ @@ -500,7 +498,7 @@ put_line (const char *string) } } /* Output that much, then break the line. */ - ignore_value (fwrite (s, 1, breakpos - s, rem->handle)); + fwrite (s, 1, breakpos - s, rem->handle); column = 8; /* Skip whitespace and prepare to print more addresses. */ diff --git a/lib/stdio.in.h b/lib/stdio.in.h new file mode 100644 index 00000000000..dd31ce29ed1 --- /dev/null +++ b/lib/stdio.in.h @@ -0,0 +1,1119 @@ +/* A GNU-like . + + Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H +/* Special invocation convention: + - Inside glibc header files. + - On OSF/1 5.1 we have a sequence of nested includes + -> -> -> -> + -> -> -> . + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. */ + +#@INCLUDE_NEXT@ @NEXT_STDIO_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _GL_STDIO_H + +#define _GL_ALREADY_INCLUDING_STDIO_H + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_STDIO_H@ + +#undef _GL_ALREADY_INCLUDING_STDIO_H + +#ifndef _GL_STDIO_H +#define _GL_STDIO_H + +/* Get va_list. Needed on many systems, including glibc 2.8. */ +#include + +#include + +/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 + and eglibc 2.11.2. */ +#include + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The __-protected variants of the attributes 'format' and 'printf' are + accepted by gcc versions 2.6.4 (effectively 2.7) and later. + We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because + gnulib and libintl do '#define printf __printf__' when they override + the 'printf' function. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +#else +# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ +#endif +#define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) + +/* Solaris 10 declares renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ + && ! defined __GLIBC__ +# include +#endif + + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* Macros for stringification. */ +#define _GL_STDIO_STRINGIZE(token) #token +#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) + + +#if @GNULIB_DPRINTF@ +# if @REPLACE_DPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define dprintf rpl_dprintf +# endif +_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...)); +# else +# if !@HAVE_DPRINTF@ +_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...)); +# endif +_GL_CXXALIASWARN (dprintf); +#elif defined GNULIB_POSIXCHECK +# undef dprintf +# if HAVE_RAW_DECL_DPRINTF +_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " + "use gnulib module dprintf for portability"); +# endif +#endif + +#if @GNULIB_FCLOSE@ +/* Close STREAM and its underlying file descriptor. */ +# if @REPLACE_FCLOSE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define fclose rpl_fclose +# endif +_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); +# else +_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); +# endif +_GL_CXXALIASWARN (fclose); +#elif defined GNULIB_POSIXCHECK +# undef fclose +/* Assume fclose is always declared. */ +_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " + "use gnulib module fclose for portable POSIX compliance"); +#endif + +#if @GNULIB_FFLUSH@ +/* Flush all pending data on STREAM according to POSIX rules. Both + output and seekable input streams are supported. + Note! LOSS OF DATA can occur if fflush is applied on an input stream + that is _not_seekable_ or on an update stream that is _not_seekable_ + and in which the most recent operation was input. Seekability can + be tested with lseek(fileno(fp),0,SEEK_CUR). */ +# if @REPLACE_FFLUSH@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define fflush rpl_fflush +# endif +_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); +_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); +# else +_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); +# endif +_GL_CXXALIASWARN (fflush); +#elif defined GNULIB_POSIXCHECK +# undef fflush +/* Assume fflush is always declared. */ +_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " + "use gnulib module fflush for portable POSIX compliance"); +#endif + +/* It is very rare that the developer ever has full control of stdin, + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ +#undef gets +_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + +#if @GNULIB_FOPEN@ +# if @REPLACE_FOPEN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fopen +# define fopen rpl_fopen +# endif +_GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); +# else +_GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); +# endif +_GL_CXXALIASWARN (fopen); +#elif defined GNULIB_POSIXCHECK +# undef fopen +/* Assume fopen is always declared. */ +_GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - " + "use gnulib module fopen for portability"); +#endif + +#if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ +# if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ + || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define fprintf rpl_fprintf +# endif +# define GNULIB_overrides_fprintf 1 +_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); +# else +_GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); +# endif +_GL_CXXALIASWARN (fprintf); +#endif +#if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK +# if !GNULIB_overrides_fprintf +# undef fprintf +# endif +/* Assume fprintf is always declared. */ +_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " + "use gnulib module fprintf-posix for portable " + "POSIX compliance"); +#endif + +#if @GNULIB_FPURGE@ +/* Discard all pending buffered I/O data on STREAM. + STREAM must not be wide-character oriented. + When discarding pending output, the file position is set back to where it + was before the write calls. When discarding pending input, the file + position is advanced to match the end of the previously read input. + Return 0 if successful. Upon error, return -1 and set errno. */ +# if @REPLACE_FPURGE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define fpurge rpl_fpurge +# endif +_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); +# else +# if !@HAVE_DECL_FPURGE@ +_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); +# endif +_GL_CXXALIASWARN (fpurge); +#elif defined GNULIB_POSIXCHECK +# undef fpurge +# if HAVE_RAW_DECL_FPURGE +_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " + "use gnulib module fpurge for portability"); +# endif +#endif + +#if @GNULIB_FPUTC@ +# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fputc +# define fputc rpl_fputc +# endif +_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); +# else +_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); +# endif +_GL_CXXALIASWARN (fputc); +#endif + +#if @GNULIB_FPUTS@ +# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fputs +# define fputs rpl_fputs +# endif +_GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream)); +# else +_GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); +# endif +_GL_CXXALIASWARN (fputs); +#endif + +#if @GNULIB_FREOPEN@ +# if @REPLACE_FREOPEN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef freopen +# define freopen rpl_freopen +# endif +_GL_FUNCDECL_RPL (freopen, FILE *, + (const char *filename, const char *mode, FILE *stream) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (freopen, FILE *, + (const char *filename, const char *mode, FILE *stream)); +# else +_GL_CXXALIAS_SYS (freopen, FILE *, + (const char *filename, const char *mode, FILE *stream)); +# endif +_GL_CXXALIASWARN (freopen); +#elif defined GNULIB_POSIXCHECK +# undef freopen +/* Assume freopen is always declared. */ +_GL_WARN_ON_USE (freopen, + "freopen on Win32 platforms is not POSIX compatible - " + "use gnulib module freopen for portability"); +#endif + + +/* Set up the following warnings, based on which modules are in use. + GNU Coding Standards discourage the use of fseek, since it imposes + an arbitrary limitation on some 32-bit hosts. Remember that the + fseek module depends on the fseeko module, so we only have three + cases to consider: + + 1. The developer is not using either module. Issue a warning under + GNULIB_POSIXCHECK for both functions, to remind them that both + functions have bugs on some systems. _GL_NO_LARGE_FILES has no + impact on this warning. + + 2. The developer is using both modules. They may be unaware of the + arbitrary limitations of fseek, so issue a warning under + GNULIB_POSIXCHECK. On the other hand, they may be using both + modules intentionally, so the developer can define + _GL_NO_LARGE_FILES in the compilation units where the use of fseek + is safe, to silence the warning. + + 3. The developer is using the fseeko module, but not fseek. Gnulib + guarantees that fseek will still work around platform bugs in that + case, but we presume that the developer is aware of the pitfalls of + fseek and was trying to avoid it, so issue a warning even when + GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be + defined to silence the warning in particular compilation units. + In C++ compilations with GNULIB_NAMESPACE, in order to avoid that + fseek gets defined as a macro, it is recommended that the developer + uses the fseek module, even if he is not calling the fseek function. + + Most gnulib clients that perform stream operations should fall into + category 3. */ + +#if @GNULIB_FSEEK@ +# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES +# define _GL_FSEEK_WARN /* Category 2, above. */ +# undef fseek +# endif +# if @REPLACE_FSEEK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fseek +# define fseek rpl_fseek +# endif +_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); +# else +_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); +# endif +_GL_CXXALIASWARN (fseek); +#endif + +#if @GNULIB_FSEEKO@ +# if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES +# define _GL_FSEEK_WARN /* Category 3, above. */ +# undef fseek +# endif +# if @REPLACE_FSEEKO@ +/* Provide an fseeko function that is aware of a preceding fflush(), and which + detects pipes. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fseeko +# define fseeko rpl_fseeko +# endif +_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); +# else +# if ! @HAVE_DECL_FSEEKO@ +_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (fseeko); +# if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@ + /* Provide an fseek function that is consistent with fseeko. */ + /* In order to avoid that fseek gets defined as a macro here, the + developer can request the 'fseek' module. */ +# if !GNULIB_defined_fseek_function +# undef fseek +# define fseek rpl_fseek +static inline int _GL_ARG_NONNULL ((1)) +rpl_fseek (FILE *fp, long offset, int whence) +{ +# if @REPLACE_FSEEKO@ + return rpl_fseeko (fp, offset, whence); +# else + return fseeko (fp, offset, whence); +# endif +} +# define GNULIB_defined_fseek_function 1 +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# define _GL_FSEEK_WARN /* Category 1, above. */ +# undef fseek +# undef fseeko +# if HAVE_RAW_DECL_FSEEKO +_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " + "use gnulib module fseeko for portability"); +# endif +#endif + +#ifdef _GL_FSEEK_WARN +# undef _GL_FSEEK_WARN +/* Here, either fseek is undefined (but C89 guarantees that it is + declared), or it is defined as rpl_fseek (declared above). */ +_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " + "on 32-bit platforms - " + "use fseeko function for handling of large files"); +#endif + + +/* ftell, ftello. See the comments on fseek/fseeko. */ + +#if @GNULIB_FTELL@ +# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES +# define _GL_FTELL_WARN /* Category 2, above. */ +# undef ftell +# endif +# if @REPLACE_FTELL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ftell +# define ftell rpl_ftell +# endif +_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); +# else +_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); +# endif +_GL_CXXALIASWARN (ftell); +#endif + +#if @GNULIB_FTELLO@ +# if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES +# define _GL_FTELL_WARN /* Category 3, above. */ +# undef ftell +# endif +# if @REPLACE_FTELLO@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ftello +# define ftello rpl_ftello +# endif +_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); +# else +# if ! @HAVE_DECL_FTELLO@ +_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); +# endif +_GL_CXXALIASWARN (ftello); +# if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@ + /* Provide an ftell function that is consistent with ftello. */ + /* In order to avoid that ftell gets defined as a macro here, the + developer can request the 'ftell' module. */ +# if !GNULIB_defined_ftell_function +# undef ftell +# define ftell rpl_ftell +static inline long _GL_ARG_NONNULL ((1)) +rpl_ftell (FILE *f) +{ +# if @REPLACE_FTELLO@ + return rpl_ftello (f); +# else + return ftello (f); +# endif +} +# define GNULIB_defined_ftell_function 1 +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# define _GL_FTELL_WARN /* Category 1, above. */ +# undef ftell +# undef ftello +# if HAVE_RAW_DECL_FTELLO +_GL_WARN_ON_USE (ftello, "ftello is unportable - " + "use gnulib module ftello for portability"); +# endif +#endif + +#ifdef _GL_FTELL_WARN +# undef _GL_FTELL_WARN +/* Here, either ftell is undefined (but C89 guarantees that it is + declared), or it is defined as rpl_ftell (declared above). */ +_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " + "on 32-bit platforms - " + "use ftello function for handling of large files"); +#endif + + +#if @GNULIB_FWRITE@ +# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fwrite +# define fwrite rpl_fwrite +# endif +_GL_FUNCDECL_RPL (fwrite, size_t, + (const void *ptr, size_t s, size_t n, FILE *stream) + _GL_ARG_NONNULL ((1, 4))); +_GL_CXXALIAS_RPL (fwrite, size_t, + (const void *ptr, size_t s, size_t n, FILE *stream)); +# else +_GL_CXXALIAS_SYS (fwrite, size_t, + (const void *ptr, size_t s, size_t n, FILE *stream)); + +/* Work around glibc bug 11959 + , + which sometimes causes an unwanted diagnostic for fwrite calls. + This affects only function declaration attributes, so it's not + needed for C++. */ +# if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL +static inline size_t _GL_ARG_NONNULL ((1, 4)) +rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream) +{ + size_t r = fwrite (ptr, s, n, stream); + (void) r; + return r; +} +# undef fwrite +# define fwrite rpl_fwrite +# endif +# endif +_GL_CXXALIASWARN (fwrite); +#endif + +#if @GNULIB_GETDELIM@ +/* Read input, up to (and including) the next occurrence of DELIMITER, from + STREAM, store it in *LINEPTR (and NUL-terminate it). + *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE + bytes of space. It is realloc'd as necessary. + Return the number of bytes read and stored at *LINEPTR (not including the + NUL terminator), or -1 on error or EOF. */ +# if @REPLACE_GETDELIM@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdelim +# define getdelim rpl_getdelim +# endif +_GL_FUNCDECL_RPL (getdelim, ssize_t, + (char **lineptr, size_t *linesize, int delimiter, + FILE *stream) + _GL_ARG_NONNULL ((1, 2, 4))); +_GL_CXXALIAS_RPL (getdelim, ssize_t, + (char **lineptr, size_t *linesize, int delimiter, + FILE *stream)); +# else +# if !@HAVE_DECL_GETDELIM@ +_GL_FUNCDECL_SYS (getdelim, ssize_t, + (char **lineptr, size_t *linesize, int delimiter, + FILE *stream) + _GL_ARG_NONNULL ((1, 2, 4))); +# endif +_GL_CXXALIAS_SYS (getdelim, ssize_t, + (char **lineptr, size_t *linesize, int delimiter, + FILE *stream)); +# endif +_GL_CXXALIASWARN (getdelim); +#elif defined GNULIB_POSIXCHECK +# undef getdelim +# if HAVE_RAW_DECL_GETDELIM +_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " + "use gnulib module getdelim for portability"); +# endif +#endif + +#if @GNULIB_GETLINE@ +/* Read a line, up to (and including) the next newline, from STREAM, store it + in *LINEPTR (and NUL-terminate it). + *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE + bytes of space. It is realloc'd as necessary. + Return the number of bytes read and stored at *LINEPTR (not including the + NUL terminator), or -1 on error or EOF. */ +# if @REPLACE_GETLINE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getline +# define getline rpl_getline +# endif +_GL_FUNCDECL_RPL (getline, ssize_t, + (char **lineptr, size_t *linesize, FILE *stream) + _GL_ARG_NONNULL ((1, 2, 3))); +_GL_CXXALIAS_RPL (getline, ssize_t, + (char **lineptr, size_t *linesize, FILE *stream)); +# else +# if !@HAVE_DECL_GETLINE@ +_GL_FUNCDECL_SYS (getline, ssize_t, + (char **lineptr, size_t *linesize, FILE *stream) + _GL_ARG_NONNULL ((1, 2, 3))); +# endif +_GL_CXXALIAS_SYS (getline, ssize_t, + (char **lineptr, size_t *linesize, FILE *stream)); +# endif +# if @HAVE_DECL_GETLINE@ +_GL_CXXALIASWARN (getline); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getline +# if HAVE_RAW_DECL_GETLINE +_GL_WARN_ON_USE (getline, "getline is unportable - " + "use gnulib module getline for portability"); +# endif +#endif + +#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ +struct obstack; +/* Grow an obstack with formatted output. Return the number of + bytes added to OBS. No trailing nul byte is added, and the + object should be closed with obstack_finish before use. Upon + memory allocation error, call obstack_alloc_failed_handler. Upon + other error, return -1. */ +# if @REPLACE_OBSTACK_PRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define obstack_printf rpl_obstack_printf +# endif +_GL_FUNCDECL_RPL (obstack_printf, int, + (struct obstack *obs, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (obstack_printf, int, + (struct obstack *obs, const char *format, ...)); +# else +# if !@HAVE_DECL_OBSTACK_PRINTF@ +_GL_FUNCDECL_SYS (obstack_printf, int, + (struct obstack *obs, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (obstack_printf, int, + (struct obstack *obs, const char *format, ...)); +# endif +_GL_CXXALIASWARN (obstack_printf); +# if @REPLACE_OBSTACK_PRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define obstack_vprintf rpl_obstack_vprintf +# endif +_GL_FUNCDECL_RPL (obstack_vprintf, int, + (struct obstack *obs, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (obstack_vprintf, int, + (struct obstack *obs, const char *format, va_list args)); +# else +# if !@HAVE_DECL_OBSTACK_PRINTF@ +_GL_FUNCDECL_SYS (obstack_vprintf, int, + (struct obstack *obs, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (obstack_vprintf, int, + (struct obstack *obs, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (obstack_vprintf); +#endif + +#if @GNULIB_PERROR@ +/* Print a message to standard error, describing the value of ERRNO, + (if STRING is not NULL and not empty) prefixed with STRING and ": ", + and terminated with a newline. */ +# if @REPLACE_PERROR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define perror rpl_perror +# endif +_GL_FUNCDECL_RPL (perror, void, (const char *string)); +_GL_CXXALIAS_RPL (perror, void, (const char *string)); +# else +_GL_CXXALIAS_SYS (perror, void, (const char *string)); +# endif +_GL_CXXALIASWARN (perror); +#elif defined GNULIB_POSIXCHECK +# undef perror +/* Assume perror is always declared. */ +_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " + "use gnulib module perror for portability"); +#endif + +#if @GNULIB_POPEN@ +# if @REPLACE_POPEN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef popen +# define popen rpl_popen +# endif +_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); +# else +_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); +# endif +_GL_CXXALIASWARN (popen); +#elif defined GNULIB_POSIXCHECK +# undef popen +# if HAVE_RAW_DECL_POPEN +_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " + "use gnulib module popen or pipe for more portability"); +# endif +#endif + +#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ +# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ + || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) +# if defined __GNUC__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +/* Don't break __attribute__((format(printf,M,N))). */ +# define printf __printf__ +# endif +_GL_FUNCDECL_RPL_1 (__printf__, int, + (const char *format, ...) + __asm__ (@ASM_SYMBOL_PREFIX@ + _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) + _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); +# else +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define printf rpl_printf +# endif +_GL_FUNCDECL_RPL (printf, int, + (const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); +# endif +# define GNULIB_overrides_printf 1 +# else +_GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); +# endif +_GL_CXXALIASWARN (printf); +#endif +#if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK +# if !GNULIB_overrides_printf +# undef printf +# endif +/* Assume printf is always declared. */ +_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " + "use gnulib module printf-posix for portable " + "POSIX compliance"); +#endif + +#if @GNULIB_PUTC@ +# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putc +# define putc rpl_fputc +# endif +_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); +# else +_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); +# endif +_GL_CXXALIASWARN (putc); +#endif + +#if @GNULIB_PUTCHAR@ +# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putchar +# define putchar rpl_putchar +# endif +_GL_FUNCDECL_RPL (putchar, int, (int c)); +_GL_CXXALIAS_RPL (putchar, int, (int c)); +# else +_GL_CXXALIAS_SYS (putchar, int, (int c)); +# endif +_GL_CXXALIASWARN (putchar); +#endif + +#if @GNULIB_PUTS@ +# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef puts +# define puts rpl_puts +# endif +_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (puts, int, (const char *string)); +# else +_GL_CXXALIAS_SYS (puts, int, (const char *string)); +# endif +_GL_CXXALIASWARN (puts); +#endif + +#if @GNULIB_REMOVE@ +# if @REPLACE_REMOVE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef remove +# define remove rpl_remove +# endif +_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (remove, int, (const char *name)); +# else +_GL_CXXALIAS_SYS (remove, int, (const char *name)); +# endif +_GL_CXXALIASWARN (remove); +#elif defined GNULIB_POSIXCHECK +# undef remove +/* Assume remove is always declared. */ +_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " + "use gnulib module remove for more portability"); +#endif + +#if @GNULIB_RENAME@ +# if @REPLACE_RENAME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rename +# define rename rpl_rename +# endif +_GL_FUNCDECL_RPL (rename, int, + (const char *old_filename, const char *new_filename) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (rename, int, + (const char *old_filename, const char *new_filename)); +# else +_GL_CXXALIAS_SYS (rename, int, + (const char *old_filename, const char *new_filename)); +# endif +_GL_CXXALIASWARN (rename); +#elif defined GNULIB_POSIXCHECK +# undef rename +/* Assume rename is always declared. */ +_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " + "use gnulib module rename for more portability"); +#endif + +#if @GNULIB_RENAMEAT@ +# if @REPLACE_RENAMEAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef renameat +# define renameat rpl_renameat +# endif +_GL_FUNCDECL_RPL (renameat, int, + (int fd1, char const *file1, int fd2, char const *file2) + _GL_ARG_NONNULL ((2, 4))); +_GL_CXXALIAS_RPL (renameat, int, + (int fd1, char const *file1, int fd2, char const *file2)); +# else +# if !@HAVE_RENAMEAT@ +_GL_FUNCDECL_SYS (renameat, int, + (int fd1, char const *file1, int fd2, char const *file2) + _GL_ARG_NONNULL ((2, 4))); +# endif +_GL_CXXALIAS_SYS (renameat, int, + (int fd1, char const *file1, int fd2, char const *file2)); +# endif +_GL_CXXALIASWARN (renameat); +#elif defined GNULIB_POSIXCHECK +# undef renameat +# if HAVE_RAW_DECL_RENAMEAT +_GL_WARN_ON_USE (renameat, "renameat is not portable - " + "use gnulib module renameat for portability"); +# endif +#endif + +#if @GNULIB_SNPRINTF@ +# if @REPLACE_SNPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define snprintf rpl_snprintf +# endif +_GL_FUNCDECL_RPL (snprintf, int, + (char *str, size_t size, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ARG_NONNULL ((3))); +_GL_CXXALIAS_RPL (snprintf, int, + (char *str, size_t size, const char *format, ...)); +# else +# if !@HAVE_DECL_SNPRINTF@ +_GL_FUNCDECL_SYS (snprintf, int, + (char *str, size_t size, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ARG_NONNULL ((3))); +# endif +_GL_CXXALIAS_SYS (snprintf, int, + (char *str, size_t size, const char *format, ...)); +# endif +_GL_CXXALIASWARN (snprintf); +#elif defined GNULIB_POSIXCHECK +# undef snprintf +# if HAVE_RAW_DECL_SNPRINTF +_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " + "use gnulib module snprintf for portability"); +# endif +#endif + +/* Some people would argue that sprintf should be handled like gets + (for example, OpenBSD issues a link warning for both functions), + since both can cause security holes due to buffer overruns. + However, we believe that sprintf can be used safely, and is more + efficient than snprintf in those safe cases; and as proof of our + belief, we use sprintf in several gnulib modules. So this header + intentionally avoids adding a warning to sprintf except when + GNULIB_POSIXCHECK is defined. */ + +#if @GNULIB_SPRINTF_POSIX@ +# if @REPLACE_SPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define sprintf rpl_sprintf +# endif +_GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); +# else +_GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); +# endif +_GL_CXXALIASWARN (sprintf); +#elif defined GNULIB_POSIXCHECK +# undef sprintf +/* Assume sprintf is always declared. */ +_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " + "use gnulib module sprintf-posix for portable " + "POSIX compliance"); +#endif + +#if @GNULIB_TMPFILE@ +# if @REPLACE_TMPFILE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define tmpfile rpl_tmpfile +# endif +_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); +_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); +# else +_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); +# endif +_GL_CXXALIASWARN (tmpfile); +#elif defined GNULIB_POSIXCHECK +# undef tmpfile +# if HAVE_RAW_DECL_TMPFILE +_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " + "use gnulib module tmpfile for portability"); +# endif +#endif + +#if @GNULIB_VASPRINTF@ +/* Write formatted output to a string dynamically allocated with malloc(). + If the memory allocation succeeds, store the address of the string in + *RESULT and return the number of resulting bytes, excluding the trailing + NUL. Upon memory allocation error, or some other error, return -1. */ +# if @REPLACE_VASPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define asprintf rpl_asprintf +# endif +_GL_FUNCDECL_RPL (asprintf, int, + (char **result, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (asprintf, int, + (char **result, const char *format, ...)); +# else +# if !@HAVE_VASPRINTF@ +_GL_FUNCDECL_SYS (asprintf, int, + (char **result, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (asprintf, int, + (char **result, const char *format, ...)); +# endif +_GL_CXXALIASWARN (asprintf); +# if @REPLACE_VASPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define vasprintf rpl_vasprintf +# endif +_GL_FUNCDECL_RPL (vasprintf, int, + (char **result, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (vasprintf, int, + (char **result, const char *format, va_list args)); +# else +# if !@HAVE_VASPRINTF@ +_GL_FUNCDECL_SYS (vasprintf, int, + (char **result, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (vasprintf, int, + (char **result, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vasprintf); +#endif + +#if @GNULIB_VDPRINTF@ +# if @REPLACE_VDPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define vdprintf rpl_vdprintf +# endif +_GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args)); +# else +# if !@HAVE_VDPRINTF@ +_GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((2))); +# endif +/* Need to cast, because on Solaris, the third parameter will likely be + __va_list args. */ +_GL_CXXALIAS_SYS_CAST (vdprintf, int, + (int fd, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vdprintf); +#elif defined GNULIB_POSIXCHECK +# undef vdprintf +# if HAVE_RAW_DECL_VDPRINTF +_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " + "use gnulib module vdprintf for portability"); +# endif +#endif + +#if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ +# if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ + || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define vfprintf rpl_vfprintf +# endif +# define GNULIB_overrides_vfprintf 1 +_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); +# else +/* Need to cast, because on Solaris, the third parameter is + __va_list args + and GCC's fixincludes did not change this to __gnuc_va_list. */ +_GL_CXXALIAS_SYS_CAST (vfprintf, int, + (FILE *fp, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vfprintf); +#endif +#if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK +# if !GNULIB_overrides_vfprintf +# undef vfprintf +# endif +/* Assume vfprintf is always declared. */ +_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " + "use gnulib module vfprintf-posix for portable " + "POSIX compliance"); +#endif + +#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ +# if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ + || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define vprintf rpl_vprintf +# endif +# define GNULIB_overrides_vprintf 1 +_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); +# else +/* Need to cast, because on Solaris, the second parameter is + __va_list args + and GCC's fixincludes did not change this to __gnuc_va_list. */ +_GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vprintf); +#endif +#if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK +# if !GNULIB_overrides_vprintf +# undef vprintf +# endif +/* Assume vprintf is always declared. */ +_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " + "use gnulib module vprintf-posix for portable " + "POSIX compliance"); +#endif + +#if @GNULIB_VSNPRINTF@ +# if @REPLACE_VSNPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define vsnprintf rpl_vsnprintf +# endif +_GL_FUNCDECL_RPL (vsnprintf, int, + (char *str, size_t size, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ARG_NONNULL ((3))); +_GL_CXXALIAS_RPL (vsnprintf, int, + (char *str, size_t size, const char *format, va_list args)); +# else +# if !@HAVE_DECL_VSNPRINTF@ +_GL_FUNCDECL_SYS (vsnprintf, int, + (char *str, size_t size, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ARG_NONNULL ((3))); +# endif +_GL_CXXALIAS_SYS (vsnprintf, int, + (char *str, size_t size, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vsnprintf); +#elif defined GNULIB_POSIXCHECK +# undef vsnprintf +# if HAVE_RAW_DECL_VSNPRINTF +_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " + "use gnulib module vsnprintf for portability"); +# endif +#endif + +#if @GNULIB_VSPRINTF_POSIX@ +# if @REPLACE_VSPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define vsprintf rpl_vsprintf +# endif +_GL_FUNCDECL_RPL (vsprintf, int, + (char *str, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (vsprintf, int, + (char *str, const char *format, va_list args)); +# else +/* Need to cast, because on Solaris, the third parameter is + __va_list args + and GCC's fixincludes did not change this to __gnuc_va_list. */ +_GL_CXXALIAS_SYS_CAST (vsprintf, int, + (char *str, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vsprintf); +#elif defined GNULIB_POSIXCHECK +# undef vsprintf +/* Assume vsprintf is always declared. */ +_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " + "use gnulib module vsprintf-posix for portable " + "POSIX compliance"); +#endif + + +#endif /* _GL_STDIO_H */ +#endif /* _GL_STDIO_H */ +#endif diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 new file mode 100644 index 00000000000..7f3ae56295f --- /dev/null +++ b/m4/stdio_h.m4 @@ -0,0 +1,140 @@ +# stdio_h.m4 serial 33 +dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_STDIO_H], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_REQUIRE([AC_C_INLINE]) + gl_NEXT_HEADERS([stdio.h]) + dnl No need to create extra modules for these functions. Everyone who uses + dnl likely needs them. + GNULIB_FPRINTF=1 + GNULIB_PRINTF=1 + GNULIB_VFPRINTF=1 + GNULIB_VPRINTF=1 + GNULIB_FPUTC=1 + GNULIB_PUTC=1 + GNULIB_PUTCHAR=1 + GNULIB_FPUTS=1 + GNULIB_PUTS=1 + GNULIB_FWRITE=1 + dnl This ifdef is just an optimization, to avoid performing a configure + dnl check whose result is not used. It does not make the test of + dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant. + m4_ifdef([gl_SIGNAL_SIGPIPE], [ + gl_SIGNAL_SIGPIPE + if test $gl_cv_header_signal_h_SIGPIPE != yes; then + REPLACE_STDIO_WRITE_FUNCS=1 + AC_LIBOBJ([stdio-write]) + fi + ]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use, and which is not + dnl guaranteed by C89. + gl_WARN_ON_USE_PREPARE([[#include + ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat + snprintf tmpfile vdprintf vsnprintf]) +]) + +AC_DEFUN([gl_STDIO_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_STDIO_H_DEFAULTS], +[ + GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF]) + GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE]) + GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH]) + GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) + GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF]) + GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX]) + GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE]) + GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC]) + GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS]) + GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) + GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) + GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) + GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) + GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO]) + GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE]) + GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) + GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) + GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) + GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) + GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR]) + GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN]) + GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF]) + GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX]) + GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC]) + GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR]) + GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) + GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) + GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) + GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) + GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) + GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) + GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) + GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE]) + GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) + GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) + GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) + GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) + GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF]) + GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX]) + GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF]) + GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE]) + HAVE_DECL_FSEEKO=1; AC_SUBST([HAVE_DECL_FSEEKO]) + HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO]) + HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) + HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) + HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) + HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) + HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) + HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) + HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO]) + HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO]) + HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT]) + HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) + HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF]) + REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF]) + REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE]) + REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) + REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) + REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) + REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) + REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) + REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK]) + REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) + REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL]) + REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO]) + REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM]) + REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE]) + REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF]) + REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR]) + REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN]) + REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF]) + REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE]) + REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME]) + REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT]) + REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) + REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) + REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) + REPLACE_TMPFILE=0; AC_SUBST([REPLACE_TMPFILE]) + REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) + REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF]) + REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF]) + REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF]) + REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF]) + REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF]) +]) From cbd350f1f3b545e07c8efeac4d4ebf2c83e46cdb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 20 Mar 2011 22:05:49 -0700 Subject: [PATCH 046/166] * .bzrignore: Add lib/stdio.h. --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index ff0a79c2675..61eea09e3cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ * Makefile.in (GNULIB_MODULES): Add stdio. * lib/stdio.in.h, m4/stdio_h.m4: New files, automatically imported from gnulib. + * .bzrignore: Add lib/stdio.h. 2011-03-20 Glenn Morris From 77185bdf91d42fb19c02af0f51ce63280ce911a0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 20 Mar 2011 22:06:47 -0700 Subject: [PATCH 047/166] Autogenerate. --- lib/gnulib.mk | 113 +++++++++++++++++++++++++++++++++++++++++++++++++- m4/gl-comp.m4 | 5 +++ 2 files changed, 117 insertions(+), 1 deletion(-) diff --git a/lib/gnulib.mk b/lib/gnulib.mk index cd6a1d00c15..58816d571b6 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink strftime symlink sys_stat +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink stdio strftime symlink sys_stat MOSTLYCLEANFILES += core *.stackdump @@ -280,6 +280,117 @@ EXTRA_DIST += stdint.in.h ## end gnulib module stdint +## begin gnulib module stdio + +BUILT_SOURCES += stdio.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ + -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ + -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ + -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ + -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ + -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ + -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ + -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ + -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ + -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ + -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ + -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ + -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ + -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ + -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ + -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ + -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ + -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ + -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ + -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ + -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ + -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ + -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ + -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ + -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ + -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ + -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ + -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ + -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ + -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ + -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ + -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \ + -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ + -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ + -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ + -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ + -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ + -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ + < $(srcdir)/stdio.in.h | \ + sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ + -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ + -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ + -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ + -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ + -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ + -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ + -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ + -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ + -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ + -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ + -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ + -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ + -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ + -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ + -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ + -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ + -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ + -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ + -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ + -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ + -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ + -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ + -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ + -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ + -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ + -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ + -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ + -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ + -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ + -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ + -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ + -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ + -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ + -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ + -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ + -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ + -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ + -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ + -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ + -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ + -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ + -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ + -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ + -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += stdio.h stdio.h-t + +EXTRA_DIST += stdio.in.h + +## end gnulib module stdio + ## begin gnulib module stdlib BUILT_SOURCES += stdlib.h diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4 index 8bf5a64a5f9..f214d8a79b5 100644 --- a/m4/gl-comp.m4 +++ b/m4/gl-comp.m4 @@ -49,6 +49,7 @@ AC_DEFUN([gl_EARLY], # Code from module stdbool: # Code from module stddef: # Code from module stdint: + # Code from module stdio: # Code from module stdlib: # Code from module strftime: # Code from module symlink: @@ -120,6 +121,8 @@ AC_DEFUN([gl_INIT], gl_STDDEF_H # Code from module stdint: gl_STDINT_H + # Code from module stdio: + gl_STDIO_H # Code from module stdlib: gl_STDLIB_H # Code from module strftime: @@ -305,6 +308,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/stdbool.in.h lib/stddef.in.h lib/stdint.in.h + lib/stdio.in.h lib/stdlib.in.h lib/strftime.c lib/strftime.h @@ -332,6 +336,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/stdbool.m4 m4/stddef_h.m4 m4/stdint.m4 + m4/stdio_h.m4 m4/stdlib_h.m4 m4/strftime.m4 m4/symlink.m4 From 37dd57d1e53ffb2d9dee6cc66d807e6d2575ef57 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 20 Mar 2011 22:50:24 -0700 Subject: [PATCH 048/166] Add Bug#. --- src/ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 26e343ddde4..f8ccbfd1f3c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-21 Paul Eggert - * fileio.c (Fcopy_file): Report error if fchown or fchmod fail. + * fileio.c (Fcopy_file): Report error if fchown or fchmod + fail (Bug#8306). * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303). From f0d80d43baa89029ea030a98350a74793ee5dc89 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Mar 2011 00:46:53 -0700 Subject: [PATCH 049/166] update-game-score: fix bug with -r * update-game-score.c (main): Don't set 'scores' to garbage when -r is specified and scorecount != MAX_SCORES. This bug was introduced in the 2002-04-10 change, and was found with gcc -Wstrict-overflow (GCC 4.5.2, x86-64). --- lib-src/ChangeLog | 6 ++++++ lib-src/update-game-score.c | 14 ++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index cc713f0b68c..2548561f313 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,11 @@ 2011-03-21 Paul Eggert + update-game-score: fix bug with -r + * update-game-score.c (main): Don't set 'scores' to garbage when + -r is specified and scorecount != MAX_SCORES. This bug was + introduced in the 2002-04-10 change, and was found with gcc + -Wstrict-overflow (GCC 4.5.2, x86-64). + fakemail: Remove dependency on ignore-value. This undoes some of the recent fakemail-related changes. It is made possible due to recent changes to gnulib's stdio module. diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index 70b79a64f91..e95e2ce259d 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -242,13 +242,15 @@ main (int argc, char **argv) push_score (&scores, &scorecount, newscore, user_id, newdata); sort_scores (scores, scorecount, reverse); /* Limit the number of scores. If we're using reverse sorting, then - we should increment the beginning of the array, to skip over the - *smallest* scores. Otherwise, we just decrement the number of - scores, since the smallest will be at the end. */ + also increment the beginning of the array, to skip over the + *smallest* scores. Otherwise, just decrementing the number of + scores suffices, since the smallest is at the end. */ if (scorecount > MAX_SCORES) - scorecount -= (scorecount - MAX_SCORES); - if (reverse) - scores += (scorecount - MAX_SCORES); + { + if (reverse) + scores += (scorecount - MAX_SCORES); + scorecount = MAX_SCORES; + } if (write_scores (scorefile, scores, scorecount) < 0) { unlock_file (scorefile, lockstate); From b16ac1ecabbcfc6dc22831ee457bee1f95a2f21f Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 21 Mar 2011 22:55:00 +0800 Subject: [PATCH 050/166] Default read-file-name-function to a non-nil value See discussion thread: http://thread.gmane.org/gmane.emacs.devel/134000 --- lisp/ChangeLog | 7 +++++++ lisp/minibuffer.el | 20 ++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d087982edee..7175df3f656 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-03-21 Leo Liu + + * minibuffer.el (read-file-name-function): Change default value. + (read-file-name--defaults): Rename from read-file-name-defaults. + (read-file-name-default): Rename from read-file-name. + (read-file-name): Call read-file-name-function. + 2011-03-21 Glenn Morris * eshell/esh-opt.el (eshell-eval-using-options, eshell-process-args): diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index fa36da01cd9..e541be9fdd9 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1486,8 +1486,9 @@ except that it passes the file name through `substitute-in-file-name'." 'completion--file-name-table) "Internal subroutine for `read-file-name'. Do not call this.") -(defvar read-file-name-function nil - "If this is non-nil, `read-file-name' does its work by calling this function.") +(defvar read-file-name-function 'read-file-name-default + "The function called by `read-file-name' to do its work. +It should accept the same arguments as `read-file-name'.") (defcustom read-file-name-completion-ignore-case (if (memq system-type '(ms-dos windows-nt darwin cygwin)) @@ -1525,7 +1526,7 @@ such as making the current buffer visit no file in the case of (declare-function x-file-dialog "xfns.c" (prompt dir &optional default-filename mustmatch only-dir-p)) -(defun read-file-name-defaults (&optional dir initial) +(defun read-file-name--defaults (&optional dir initial) (let ((default (cond ;; With non-nil `initial', use `dir' as the first default. @@ -1592,6 +1593,12 @@ treated as equivalent to nil. See also `read-file-name-completion-ignore-case' and `read-file-name-function'." + (funcall (or read-file-name-function #'read-file-name-default) + prompt dir default-filename mustmatch initial predicate)) + +(defun read-file-name-default (prompt &optional dir default-filename mustmatch initial predicate) + "Default method for reading file names. +See `read-file-name' for the meaning of the arguments." (unless dir (setq dir default-directory)) (unless (file-name-absolute-p dir) (setq dir (expand-file-name dir))) (unless default-filename @@ -1613,9 +1620,6 @@ and `read-file-name-function'." (minibuffer--double-dollars dir))) (initial (cons (minibuffer--double-dollars initial) 0))))) - (if read-file-name-function - (funcall read-file-name-function - prompt dir default-filename mustmatch initial predicate) (let ((completion-ignore-case read-file-name-completion-ignore-case) (minibuffer-completing-file-name t) (pred (or predicate 'file-exists-p)) @@ -1651,7 +1655,7 @@ and `read-file-name-function'." (lambda () (with-current-buffer (window-buffer (minibuffer-selected-window)) - (read-file-name-defaults dir initial))))) + (read-file-name--defaults dir initial))))) (completing-read prompt 'read-file-name-internal pred mustmatch insdef 'file-name-history default-filename))) @@ -1725,7 +1729,7 @@ and `read-file-name-function'." (if history-delete-duplicates (delete val1 file-name-history) file-name-history))))))) - val))))) + val)))) (defun internal-complete-buffer-except (&optional buffer) "Perform completion on all buffers excluding BUFFER. From 810f76988a8a68ea13f16090c7065abbfe615f39 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 21 Mar 2011 23:26:05 +0800 Subject: [PATCH 051/166] Remove leftover (require 'wid-edit) --- lisp/ChangeLog | 3 +++ lisp/vc/log-view.el | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7175df3f656..f9c412d195a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-03-21 Leo Liu + * vc/log-view.el: Remove (require 'wid-edit), not needed after the + change on 2011-02-13 (bug#8309). + * minibuffer.el (read-file-name-function): Change default value. (read-file-name--defaults): Rename from read-file-name-defaults. (read-file-name-default): Rename from read-file-name. diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index fa731e77a6e..cb1c181fa61 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -121,9 +121,6 @@ :group 'pcl-cvs :prefix "log-view-") -;; Needed because log-view-mode-map inherits from widget-keymap. (Bug#5311) -(require 'wid-edit) - (easy-mmode-defmap log-view-mode-map '( ;; FIXME: (copy-keymap special-mode-map) instead From 5d6d7e57010a1e09d553885c1ad5d54b7ba96747 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Mar 2011 09:22:16 -0700 Subject: [PATCH 052/166] Add Bug#. --- lib-src/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 2548561f313..a5d20af4263 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -2,8 +2,8 @@ update-game-score: fix bug with -r * update-game-score.c (main): Don't set 'scores' to garbage when - -r is specified and scorecount != MAX_SCORES. This bug was - introduced in the 2002-04-10 change, and was found with gcc + -r is specified and scorecount != MAX_SCORES (Bug#8310). This bug + was introduced in the 2002-04-10 change, and was found with gcc -Wstrict-overflow (GCC 4.5.2, x86-64). fakemail: Remove dependency on ignore-value. From a44c5709cecc6d21246c66651ea8c51201b8881a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Mar 2011 09:26:05 -0700 Subject: [PATCH 053/166] Merge from gnulib. --- lib/strftime.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/strftime.c b/lib/strftime.c index 0a02b507744..acebc9adfad 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -172,15 +172,16 @@ extern char *tzname[]; #define add(n, f) \ do \ { \ - int _n = (n); \ - int _delta = width - _n; \ - int _incr = _n + (_delta > 0 ? _delta : 0); \ - if ((size_t) _incr >= maxsize - i) \ + size_t _n = (n); \ + size_t _w = (width < 0 ? 0 : width); \ + size_t _incr = _n < _w ? _w : _n; \ + if (_incr >= maxsize - i) \ return 0; \ if (p) \ { \ - if (digits == 0 && _delta > 0) \ + if (digits == 0 && _n < _w) \ { \ + size_t _delta = width - _n; \ if (pad == L_('0')) \ memset_zero (p, _delta); \ else \ From 78f64af0ae54388453ad80171e6a1691818299af Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 21 Mar 2011 12:34:16 -0400 Subject: [PATCH 054/166] * subr.el (deferred-action-list, deferred-action-function): Mark obsolete. --- etc/NEWS | 1 + lisp/ChangeLog | 5 +++++ lisp/subr.el | 2 ++ 3 files changed, 8 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index a7ec965e3d6..263ab2eff3b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -746,6 +746,7 @@ sc.el, x-menu.el, rnews.el, rnewspost.el * Lisp changes in Emacs 24.1 ** byte-compile-disable-print-circle is obsolete. +** deferred-action-list and deferred-action-function are obsolete. ** Removed the stack-trace-on-error variable. Also the debugger can now "continue" from an error, which means it will jump to the error handler as if the debugger had not been invoked instead of diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f9c412d195a..5c119c37323 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-21 Stefan Monnier + + * subr.el (deferred-action-list, deferred-action-function): + Mark obsolete. + 2011-03-21 Leo Liu * vc/log-view.el: Remove (require 'wid-edit), not needed after the diff --git a/lisp/subr.el b/lisp/subr.el index 6f39a41709e..8ea4becdc11 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1101,6 +1101,8 @@ is converted into a string by expressing it in decimal." (make-obsolete-variable 'define-key-rebound-commands nil "23.2") (make-obsolete-variable 'redisplay-end-trigger-functions 'jit-lock-register "23.1") +(make-obsolete-variable 'deferred-action-list 'post-command-hook "24.1") +(make-obsolete-variable 'deferred-action-function 'post-command-hook "24.1") (make-obsolete 'window-redisplay-end-trigger nil "23.1") (make-obsolete 'set-window-redisplay-end-trigger nil "23.1") From 3ef271f27f47dab138d431a72838d43a17102e27 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Mar 2011 09:40:05 -0700 Subject: [PATCH 055/166] etags: In Prolog functions, don't assume int fits in size_t. This avoids a warning with gcc -Wstrict-overflow. * etags.c (Prolog_functions, prolog_pr, prolog_atom): Use size_t, not int, to store sizes. (prolog_atom): Return 0, not -1, on error. All callers changed. --- lib-src/ChangeLog | 6 ++++++ lib-src/etags.c | 32 ++++++++++++++++---------------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index a5d20af4263..cb847669deb 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,11 @@ 2011-03-21 Paul Eggert + etags: In Prolog functions, don't assume int fits in size_t. + This avoids a warning with gcc -Wstrict-overflow. + * etags.c (Prolog_functions, prolog_pr, prolog_atom): Use size_t, + not int, to store sizes. + (prolog_atom): Return 0, not -1, on error. All callers changed. + update-game-score: fix bug with -r * update-game-score.c (main): Don't set 'scores' to garbage when -r is specified and scorecount != MAX_SCORES (Bug#8310). This bug diff --git a/lib-src/etags.c b/lib-src/etags.c index 385e4cc9721..0c14a0d1663 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -5254,16 +5254,16 @@ HTML_labels (FILE *inf) * Original code by Sunichirou Sugou (1989) * Rewritten by Anders Lindgren (1996) */ -static int prolog_pr (char *, char *); +static size_t prolog_pr (char *, char *); static void prolog_skip_comment (linebuffer *, FILE *); -static int prolog_atom (char *, int); +static size_t prolog_atom (char *, size_t); static void Prolog_functions (FILE *inf) { char *cp, *last; - int len; - int allocated; + size_t len; + size_t allocated; allocated = 0; len = 0; @@ -5320,16 +5320,16 @@ prolog_skip_comment (linebuffer *plb, FILE *inf) * Return the size of the name of the predicate or rule, or 0 if no * header was found. */ -static int +static size_t prolog_pr (char *s, char *last) /* Name of last clause. */ { - int pos; - int len; + size_t pos; + size_t len; pos = prolog_atom (s, 0); - if (pos < 1) + if (! pos) return 0; len = pos; @@ -5339,7 +5339,7 @@ prolog_pr (char *s, char *last) || (s[pos] == '(' && (pos += 1)) || (s[pos] == ':' && s[pos + 1] == '-' && (pos += 2))) && (last == NULL /* save only the first clause */ - || len != (int)strlen (last) + || len != strlen (last) || !strneq (s, last, len))) { make_tag (s, len, TRUE, s, pos, lineno, linecharno); @@ -5351,17 +5351,17 @@ prolog_pr (char *s, char *last) /* * Consume a Prolog atom. - * Return the number of bytes consumed, or -1 if there was an error. + * Return the number of bytes consumed, or 0 if there was an error. * * A prolog atom, in this context, could be one of: * - An alphanumeric sequence, starting with a lower case letter. * - A quoted arbitrary string. Single quotes can escape themselves. * Backslash quotes everything. */ -static int -prolog_atom (char *s, int pos) +static size_t +prolog_atom (char *s, size_t pos) { - int origpos; + size_t origpos; origpos = pos; @@ -5390,11 +5390,11 @@ prolog_atom (char *s, int pos) } else if (s[pos] == '\0') /* Multiline quoted atoms are ignored. */ - return -1; + return 0; else if (s[pos] == '\\') { if (s[pos+1] == '\0') - return -1; + return 0; pos += 2; } else @@ -5403,7 +5403,7 @@ prolog_atom (char *s, int pos) return pos - origpos; } else - return -1; + return 0; } From 58cb46fbf4a0d3b37cb9cf2b07446eaa48663693 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Mar 2011 09:41:03 -0700 Subject: [PATCH 056/166] * etags.c (Ada_funcs): Redo slightly to avoid overflow warning. --- lib-src/ChangeLog | 2 ++ lib-src/etags.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index cb847669deb..6c25f582eea 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-21 Paul Eggert + * etags.c (Ada_funcs): Redo slightly to avoid overflow warning. + etags: In Prolog functions, don't assume int fits in size_t. This avoids a warning with gcc -Wstrict-overflow. * etags.c (Prolog_functions, prolog_pr, prolog_atom): Use size_t, diff --git a/lib-src/etags.c b/lib-src/etags.c index 0c14a0d1663..6cb321fe75e 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -4198,7 +4198,7 @@ Ada_funcs (FILE *inf) /* Skip a string i.e. "abcd". */ if (inquote || (*dbp == '"')) { - dbp = etags_strchr ((inquote) ? dbp : dbp+1, '"'); + dbp = etags_strchr (dbp + !inquote, '"'); if (dbp != NULL) { inquote = FALSE; From af896da66a50ca020c8cb8293c4bf5ddfb0cb448 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 22 Mar 2011 01:48:36 +0800 Subject: [PATCH 057/166] Fix history adding in ido-read-internal Assume, for example, the head of matches is "RSS" and user input is "rs". If the user hit RET, "RSS" is selected but "rs" is added to the history. This commit fixes this inconsistency. --- lisp/ChangeLog | 5 +++++ lisp/ido.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c119c37323..a52abe07b1f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-21 Leo Liu + + * ido.el (ido-read-internal): Add ido-selected to history instead + of user input. + 2011-03-21 Stefan Monnier * subr.el (deferred-action-list, deferred-action-function): diff --git a/lisp/ido.el b/lisp/ido.el index 2a5c7cf2f0e..df7516993b7 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1978,7 +1978,9 @@ If INITIAL is non-nil, it specifies the initial input string." (ido-completing-read t) (ido-require-match require-match) (ido-use-mycompletion-depth (1+ (minibuffer-depth))) - (show-paren-mode nil)) + (show-paren-mode nil) + ;; Postpone history adding till later + (history-add-new-input nil)) ;; prompt the user for the file name (setq ido-exit nil) (setq ido-final-text @@ -2158,6 +2160,7 @@ If INITIAL is non-nil, it specifies the initial input string." (t (setq done t)))))) + (and history (add-to-history history ido-selected)) ido-selected)) (defun ido-edit-input () From b1f961e1fa871419e3e75759ad2fefee032ebff5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Mar 2011 11:03:15 -0700 Subject: [PATCH 058/166] * ebrowse.c: Use size_t, not int, for sizes. This avoids a warning with gcc -Wstrict-overflow, and works better for very large objects. (inbuffer_size): Now size_t. All uses changed. (xmalloc, xrealloc, operator_name, process_file): Use size_t for sizes. Don't bother testing whether a size_t value can be negative. --- lib-src/ChangeLog | 7 +++++++ lib-src/ebrowse.c | 22 ++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 6c25f582eea..909bee743bb 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,12 @@ 2011-03-21 Paul Eggert + * ebrowse.c: Use size_t, not int, for sizes. + This avoids a warning with gcc -Wstrict-overflow, and works + better for very large objects. + (inbuffer_size): Now size_t. All uses changed. + (xmalloc, xrealloc, operator_name, process_file): Use size_t for + sizes. Don't bother testing whether a size_t value can be negative. + * etags.c (Ada_funcs): Redo slightly to avoid overflow warning. etags: In Prolog functions, don't assume int fits in size_t. diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 113b6fdfe40..7871a804997 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -378,7 +378,7 @@ int max_regexp = 50; char *inbuffer; char *in; -int inbuffer_size; +size_t inbuffer_size; /* Return the current buffer position in the input file. */ @@ -492,7 +492,7 @@ yyerror (const char *format, const char *s) available. */ static void * -xmalloc (int nbytes) +xmalloc (size_t nbytes) { void *p = malloc (nbytes); if (p == NULL) @@ -507,7 +507,7 @@ xmalloc (int nbytes) /* Like realloc but print an error and exit if out of memory. */ static void * -xrealloc (void *p, int sz) +xrealloc (void *p, size_t sz) { p = realloc (p, sz); if (p == NULL) @@ -2792,10 +2792,10 @@ parse_classname (void) static char * operator_name (int *sc) { - static int id_size = 0; + static size_t id_size = 0; static char *id = NULL; const char *s; - int len; + size_t len; MATCH (); @@ -2811,7 +2811,7 @@ operator_name (int *sc) len = strlen (s) + 10; if (len > id_size) { - int new_size = max (len, 2 * id_size); + size_t new_size = max (len, 2 * id_size); id = (char *) xrealloc (id, new_size); id_size = new_size; } @@ -2832,7 +2832,7 @@ operator_name (int *sc) } else { - int tokens_matched = 0; + size_t tokens_matched = 0; len = 20; if (len > id_size) @@ -2853,7 +2853,7 @@ operator_name (int *sc) len += strlen (s) + 2; if (len > id_size) { - int new_size = max (len, 2 * id_size); + size_t new_size = max (len, 2 * id_size); id = (char *) xrealloc (id, new_size); id_size = new_size; } @@ -3550,7 +3550,7 @@ process_file (char *file) fp = open_file (file); if (fp) { - int nread, nbytes; + size_t nread, nbytes; /* Give a progress indication if needed. */ if (f_very_verbose) @@ -3574,12 +3574,10 @@ process_file (char *file) } nbytes = fread (inbuffer + nread, 1, READ_CHUNK_SIZE, fp); - if (nbytes <= 0) + if (nbytes == 0) break; nread += nbytes; } - if (nread < 0) - nread = 0; inbuffer[nread] = '\0'; /* Reinitialize scanner and parser for the new input file. */ From 7f650bb9a878f4ce87828bf068edd9d2b5ca032e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Mar 2011 11:09:45 -0700 Subject: [PATCH 059/166] * frame.c (Fmodify_frame_parameters): Simplify loop counter. This also avoids a warning with gcc -Wstrict-overflow. --- src/ChangeLog | 3 +++ src/frame.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index f8ccbfd1f3c..d833648667d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-21 Paul Eggert + * frame.c (Fmodify_frame_parameters): Simplify loop counter. + This also avoids a warning with gcc -Wstrict-overflow. + * fileio.c (Fcopy_file): Report error if fchown or fchmod fail (Bug#8306). diff --git a/src/frame.c b/src/frame.c index 05938f3e1f0..5c676527909 100644 --- a/src/frame.c +++ b/src/frame.c @@ -2529,8 +2529,9 @@ use is not recommended. Explicitly check for a frame-parameter instead. */) } /* Now process them in reverse of specified order. */ - for (i--; i >= 0; i--) + while (i != 0) { + i--; prop = parms[i]; val = values[i]; store_frame_param (f, prop, val); From 5ffe6683c36bdaed21324ddd59cb47aecadea8ea Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Mar 2011 11:11:03 -0700 Subject: [PATCH 060/166] Better version of previous patch. --- src/frame.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/frame.c b/src/frame.c index 5c676527909..60f192e9817 100644 --- a/src/frame.c +++ b/src/frame.c @@ -2529,9 +2529,8 @@ use is not recommended. Explicitly check for a frame-parameter instead. */) } /* Now process them in reverse of specified order. */ - while (i != 0) + while (--i >= 0) { - i--; prop = parms[i]; val = values[i]; store_frame_param (f, prop, val); From 39f5e5198f666c1a00b9df957a17b2c3fe11a9ae Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Mar 2011 11:12:38 -0700 Subject: [PATCH 061/166] * frame.c (validate_x_resource_name): Simplify count usage. This also avoids a warning with gcc -Wstrict-overflow. --- src/ChangeLog | 2 ++ src/frame.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d833648667d..34104669a53 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ * frame.c (Fmodify_frame_parameters): Simplify loop counter. This also avoids a warning with gcc -Wstrict-overflow. + (validate_x_resource_name): Simplify count usage. + This also avoids a warning with gcc -Wstrict-overflow. * fileio.c (Fcopy_file): Report error if fchown or fchmod fail (Bug#8306). diff --git a/src/frame.c b/src/frame.c index 60f192e9817..3e00e1bf107 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3713,8 +3713,7 @@ validate_x_resource_name (void) return; /* If name is entirely invalid, or nearly so, use `emacs'. */ - if (good_count == 0 - || (good_count == 1 && bad_count > 0)) + if (good_count < 2) { Vx_resource_name = build_string ("emacs"); return; From 0357c7ae9cf59511c28dccd566b89b5eadc7f62e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 21 Mar 2011 18:09:52 -0400 Subject: [PATCH 062/166] * lisp/custom.el (custom-push-theme): Quote "changed" custom var entry. --- lisp/ChangeLog | 4 ++++ lisp/custom.el | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a52abe07b1f..3a4b3feeec6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-21 Chong Yidong + + * custom.el (custom-push-theme): Quote "changed" custom var entry. + 2011-03-21 Leo Liu * ido.el (ido-read-internal): Add ido-selected to history instead diff --git a/lisp/custom.el b/lisp/custom.el index cf06fe27f4d..4f7826093e8 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -849,10 +849,10 @@ See `custom-known-themes' for a list of known themes." ;; theme is later disabled. (cond ((and (eq prop 'theme-value) (boundp symbol)) - (let ((sv (get symbol 'standard-value))) - (unless (and sv - (equal (eval (car sv)) (symbol-value symbol))) - (setq old (list (list 'changed (symbol-value symbol))))))) + (let ((sv (get symbol 'standard-value)) + (val (symbol-value symbol))) + (unless (and sv (equal (eval (car sv)) val)) + (setq old `((changed ,(custom-quote val))))))) ((and (facep symbol) (not (face-attr-match-p symbol From fccee4ab7294f92e42ebf90786b7b301d0368e87 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 21 Mar 2011 20:30:23 -0400 Subject: [PATCH 063/166] Special handling of the `custom-enabled-themes' custom variable. * lisp/custom.el (custom--inhibit-theme-enable): Make it affect only custom-theme-set-variables and custom-theme-set-faces. (provide-theme): Ignore custom--inhibit-theme-enable. (load-theme): Enable the theme explicitly if NO-ENABLE is non-nil. (custom-enabling-themes): Delete variable. (enable-theme): Accept only loaded themes as arguments. Ignore the special custom-enabled-themes variable. (custom-enabled-themes): Forbid themes from setting this. Eliminate use of custom-enabling-themes. (custom-push-theme): Quote "changed" custom var entry. --- lisp/ChangeLog | 13 +++++- lisp/custom.el | 120 ++++++++++++++++++++++++------------------------- 2 files changed, 69 insertions(+), 64 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3a4b3feeec6..954c68c0d2f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,15 @@ -2011-03-21 Chong Yidong +2011-03-22 Chong Yidong - * custom.el (custom-push-theme): Quote "changed" custom var entry. + * custom.el (custom--inhibit-theme-enable): Make it affect only + custom-theme-set-variables and custom-theme-set-faces. + (provide-theme): Ignore custom--inhibit-theme-enable. + (load-theme): Enable the theme explicitly if NO-ENABLE is non-nil. + (custom-enabling-themes): Delete variable. + (enable-theme): Accept only loaded themes as arguments. Ignore + the special custom-enabled-themes variable. + (custom-enabled-themes): Forbid themes from setting this. + Eliminate use of custom-enabling-themes. + (custom-push-theme): Quote "changed" custom var entry. 2011-03-21 Leo Liu diff --git a/lisp/custom.el b/lisp/custom.el index 4f7826093e8..e837c501438 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1081,10 +1081,10 @@ name." :version "24.1") (defvar custom--inhibit-theme-enable nil - "If non-nil, loading a theme does not enable it. -This internal variable is set by `load-theme' when its NO-ENABLE -argument is non-nil, and it affects `custom-theme-set-variables', -`custom-theme-set-faces', and `provide-theme'." ) + "Whether the custom-theme-set-* functions act immediately. +If nil, `custom-theme-set-variables' and `custom-theme-set-faces' +change the current values of the given variable or face. If +non-nil, they just make a record of the theme settings.") (defun provide-theme (theme) "Indicate that this file provides THEME. @@ -1094,15 +1094,7 @@ property `theme-feature' (which is usually a symbol created by (unless (custom-theme-name-valid-p theme) (error "Custom theme cannot be named %S" theme)) (custom-check-theme theme) - (provide (get theme 'theme-feature)) - (unless custom--inhibit-theme-enable - ;; By default, loading a theme also enables it. - (push theme custom-enabled-themes) - ;; `user' must always be the highest-precedence enabled theme. - ;; Make that remain true. (This has the effect of making user - ;; settings override the ones just loaded, too.) - (let ((custom-enabling-themes t)) - (enable-theme 'user)))) + (provide (get theme 'theme-feature))) (defcustom custom-safe-themes '(default) "List of themes that are considered safe to load. @@ -1154,9 +1146,11 @@ Return t if THEME was successfully loaded, nil otherwise." (expand-file-name "themes/" data-directory))) (member hash custom-safe-themes) (custom-theme-load-confirm hash)) - (let ((custom--inhibit-theme-enable no-enable)) - (eval-buffer) - t))))) + (let ((custom--inhibit-theme-enable t)) + (eval-buffer)) + (unless no-enable + (enable-theme theme)) + t)))) (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. @@ -1235,68 +1229,70 @@ NAME should be a symbol." ;;; Enabling and disabling loaded themes. -(defvar custom-enabling-themes nil) - (defun enable-theme (theme) "Reenable all variable and face settings defined by THEME. -The newly enabled theme gets the highest precedence (after `user'). -If it is already enabled, just give it highest precedence (after `user'). - -If THEME does not specify any theme settings, this tries to load -the theme from its theme file, by calling `load-theme'." +THEME should be either `user', or a theme loaded via `load-theme'. +After this function completes, THEME will have the highest +precedence (after `user')." (interactive (list (intern (completing-read "Enable custom theme: " - obarray (lambda (sym) (get sym 'theme-settings)))))) + obarray (lambda (sym) (get sym 'theme-settings)) t)))) (if (not (custom-theme-p theme)) - (load-theme theme) - ;; This could use a bit of optimization -- cyd - (let ((settings (get theme 'theme-settings))) - (dolist (s settings) - (let* ((prop (car s)) - (symbol (cadr s)) - (spec-list (get symbol prop))) - (put symbol prop (cons (cddr s) (assq-delete-all theme spec-list))) - (if (eq prop 'theme-value) - (custom-theme-recalc-variable symbol) - (custom-theme-recalc-face symbol))))) - (unless (eq theme 'user) - (setq custom-enabled-themes - (cons theme (delq theme custom-enabled-themes))) - (unless custom-enabling-themes - (enable-theme 'user))))) + (error "Undefined Custom theme %s" theme)) + (let ((settings (get theme 'theme-settings))) + ;; Loop through theme settings, recalculating vars/faces. + (dolist (s settings) + (let* ((prop (car s)) + (symbol (cadr s)) + (spec-list (get symbol prop))) + (put symbol prop (cons (cddr s) (assq-delete-all theme spec-list))) + (cond + ((eq prop 'theme-face) + (custom-theme-recalc-face symbol)) + ((eq prop 'theme-value) + ;; Don't change `custom-enabled-themes'; that's special. + (unless (eq symbol 'custom-enabled-themes) + (custom-theme-recalc-variable symbol))))))) + (unless (eq theme 'user) + (setq custom-enabled-themes + (cons theme (delq theme custom-enabled-themes))) + ;; Give the `user' theme the highest priority. + (enable-theme 'user))) (defcustom custom-enabled-themes nil "List of enabled Custom Themes, highest precedence first. +This list does not include the `user' theme, which is set by +Customize and always takes precedence over other Custom Themes. -This does not include the `user' theme, which is set by Customize, -and always takes precedence over other Custom Themes." +This variable cannot be defined inside a Custom theme; there, it +is simply ignored." :group 'customize :type '(repeat symbol) :set-after '(custom-theme-directory custom-theme-load-path custom-safe-themes) :risky t :set (lambda (symbol themes) - ;; Avoid an infinite loop when custom-enabled-themes is - ;; defined in a theme (e.g. `user'). Enabling the theme sets - ;; custom-enabled-themes, which enables the theme... - (unless custom-enabling-themes - (let ((custom-enabling-themes t) failures) - (setq themes (delq 'user (delete-dups themes))) - (if (boundp symbol) - (dolist (theme (symbol-value symbol)) - (if (not (memq theme themes)) - (disable-theme theme)))) - (dolist (theme (reverse themes)) - (condition-case nil - (enable-theme theme) - (error (progn (push theme failures) - (setq themes (delq theme themes)))))) - (enable-theme 'user) - (custom-set-default symbol themes) - (if failures - (message "Failed to enable themes: %s" - (mapconcat 'symbol-name failures " "))))))) + (let (failures) + (setq themes (delq 'user (delete-dups themes))) + ;; Disable all themes not in THEMES. + (if (boundp symbol) + (dolist (theme (symbol-value symbol)) + (if (not (memq theme themes)) + (disable-theme theme)))) + ;; Call `enable-theme' or `load-theme' on each of THEMES. + (dolist (theme (reverse themes)) + (condition-case nil + (if (custom-theme-p theme) + (enable-theme theme) + (load-theme theme)) + (error (setq failures (cons theme failures) + themes (delq theme themes))))) + (enable-theme 'user) + (custom-set-default symbol themes) + (if failures + (message "Failed to enable theme: %s" + (mapconcat 'symbol-name failures ", ")))))) (defsubst custom-theme-enabled-p (theme) "Return non-nil if THEME is enabled." From 34cb1cc610f71fb880a2a767061aade29e93a983 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 21 Mar 2011 20:28:41 -0700 Subject: [PATCH 064/166] copy_autogen tweaks. * autogen/copy_autogen: Work from ./ or ../. Fix time-stamps. * autogen.sh: Doc fix. --- ChangeLog | 6 ++++++ autogen.sh | 2 +- autogen/copy_autogen | 9 +++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a58a60465d4..d13832b9060 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-03-22 Glenn Morris + + * autogen/copy_autogen: Work from ./ or ../. + Fix time-stamps. + * autogen.sh: Doc fix. + 2011-03-20 Glenn Morris * autogen/: New directory, to be excluded from releases. diff --git a/autogen.sh b/autogen.sh index a56b8d77826..03c39ee9456 100755 --- a/autogen.sh +++ b/autogen.sh @@ -184,7 +184,7 @@ instead of this script. If all else fails, you can try using the pre-built versions of the generated files by doing: -cd autogen && ./copy_autogen +./autogen/copy_autogen This is not recommended - see the comments in \`copy_autogen'. diff --git a/autogen/copy_autogen b/autogen/copy_autogen index 4abdbd87c0f..2096636c38b 100755 --- a/autogen/copy_autogen +++ b/autogen/copy_autogen @@ -8,12 +8,17 @@ ## regenerate configure and will fail if you do not have the required ## tools. You will have to run this script again. +test -d autogen && cd autogen + if test ! -e config.in; then - echo "You must run this script from the autogen/ directory." + echo "Cannot find autogen/ directory." exit 1 fi -cp configure aclocal.m4 ../ +## Order implied by top-level Makefile's rules, for time-stamps. +cp aclocal.m4 ../ +cp configure ../ +touch ../src/stamp-h.in cp config.in ../src/ cp Makefile.in ../lib/ From f0641eff4f15f93287576f9902e4657af4fdd3e3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 22 Mar 2011 00:48:10 -0700 Subject: [PATCH 065/166] * scroll.c (do_scrolling): Work around GCC bug 48228. See . --- src/ChangeLog | 5 +++++ src/scroll.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 34104669a53..d491d089514 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-22 Paul Eggert + + * scroll.c (do_scrolling): Work around GCC bug 48228. + See . + 2011-03-21 Paul Eggert * frame.c (Fmodify_frame_parameters): Simplify loop counter. diff --git a/src/scroll.c b/src/scroll.c index 33af18d2090..f013ebbee0e 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -245,8 +245,8 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct m int i, j, k; /* Set to 1 if we have set a terminal window with - set_terminal_window. */ - int terminal_window_p = 0; + set_terminal_window. It's unsigned to work around GCC bug 48228. */ + unsigned int terminal_window_p = 0; /* A queue for line insertions to be done. */ struct queue { int count, pos; }; From 19ab8a188aed3904edb0cfa026503c4d63c57c5a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 22 Mar 2011 01:10:11 -0700 Subject: [PATCH 066/166] * xdisp.c (message_log_check_duplicate): Return unsigned long, not int. This is less likely to overflow, and avoids undefined behavior if overflow does occur. All callers changed. Use strtoul to scan for the unsigned long integer. --- src/ChangeLog | 5 +++++ src/xdisp.c | 17 ++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d491d089514..a9f3e3a5b70 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-03-22 Paul Eggert + * xdisp.c (message_log_check_duplicate): Return unsigned long, not int. + This is less likely to overflow, and avoids undefined behavior if + overflow does occur. All callers changed. Use strtoul to scan + for the unsigned long integer. + * scroll.c (do_scrolling): Work around GCC bug 48228. See . diff --git a/src/xdisp.c b/src/xdisp.c index a7955f41e0c..93bc8c9479e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -802,8 +802,8 @@ static int cursor_row_fully_visible_p (struct window *, int, int); static int try_scrolling (Lisp_Object, int, EMACS_INT, EMACS_INT, int, int); static int try_cursor_movement (Lisp_Object, struct text_pos, int *); static int trailing_whitespace_p (EMACS_INT); -static int message_log_check_duplicate (EMACS_INT, EMACS_INT, - EMACS_INT, EMACS_INT); +static unsigned long int message_log_check_duplicate (EMACS_INT, EMACS_INT, + EMACS_INT, EMACS_INT); static void push_it (struct it *); static void pop_it (struct it *); static void sync_frame_with_window_matrix_rows (struct window *); @@ -7973,7 +7973,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) if (nlflag) { EMACS_INT this_bol, this_bol_byte, prev_bol, prev_bol_byte; - int dups; + unsigned long int dups; insert_1 ("\n", 1, 1, 0, 0); scan_newline (Z, Z_BYTE, BEG, BEG_BYTE, -2, 0); @@ -8001,7 +8001,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) /* If you change this format, don't forget to also change message_log_check_duplicate. */ - sprintf (dupstr, " [%d times]", dups); + sprintf (dupstr, " [%lu times]", dups); duplen = strlen (dupstr); TEMP_SET_PT_BOTH (Z - 1, Z_BYTE - 1); insert_1 (dupstr, duplen, 1, 0, 1); @@ -8063,7 +8063,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) Return 0 if different, 1 if the new one should just replace it, or a value N > 1 if we should also append " [N times]". */ -static int +static unsigned long int message_log_check_duplicate (EMACS_INT prev_bol, EMACS_INT prev_bol_byte, EMACS_INT this_bol, EMACS_INT this_bol_byte) { @@ -8085,10 +8085,9 @@ message_log_check_duplicate (EMACS_INT prev_bol, EMACS_INT prev_bol_byte, return 2; if (*p1++ == ' ' && *p1++ == '[') { - int n = 0; - while (*p1 >= '0' && *p1 <= '9') - n = n * 10 + *p1++ - '0'; - if (strncmp ((char *) p1, " times]\n", 8) == 0) + char *pend; + unsigned long int n = strtoul ((char *) p1, &pend, 10); + if (strncmp (pend, " times]\n", 8) == 0) return n+1; } return 0; From b7cbbd6f018241962b432c1a608067614d223a6d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 22 Mar 2011 01:15:43 -0700 Subject: [PATCH 067/166] * xdisp.c (pint2hrstr): Simplify and tune code slightly. This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow. --- src/ChangeLog | 2 ++ src/xdisp.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a9f3e3a5b70..fd135de123b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,8 @@ This is less likely to overflow, and avoids undefined behavior if overflow does occur. All callers changed. Use strtoul to scan for the unsigned long integer. + (pint2hrstr): Simplify and tune code slightly. + This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow. * scroll.c (do_scrolling): Work around GCC bug 48228. See . diff --git a/src/xdisp.c b/src/xdisp.c index 93bc8c9479e..457a5e3e11b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -19006,7 +19006,7 @@ pint2str (register char *buf, register int width, register EMACS_INT d) static const char power_letter[] = { - 0, /* not used */ + 0, /* no letter */ 'k', /* kilo */ 'M', /* mega */ 'G', /* giga */ @@ -19088,8 +19088,7 @@ pint2hrstr (char *buf, int width, int d) p = psuffix = buf + max (width, length); /* Print EXPONENT. */ - if (exponent) - *psuffix++ = power_letter[exponent]; + *psuffix++ = power_letter[exponent]; *psuffix = '\0'; /* Print TENTHS. */ From 916c72e97a711e6d0f571a507634e4f795fbaf6c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 22 Mar 2011 01:59:50 -0700 Subject: [PATCH 068/166] * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes that could (at least in theory) be that large. --- src/ChangeLog | 3 +++ src/xmenu.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index fd135de123b..c8fa1e55695 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-22 Paul Eggert + * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes + that could (at least in theory) be that large. + * xdisp.c (message_log_check_duplicate): Return unsigned long, not int. This is less likely to overflow, and avoids undefined behavior if overflow does occur. All callers changed. Use strtoul to scan diff --git a/src/xmenu.c b/src/xmenu.c index eab7bb03f20..60ac27a5b8f 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -922,7 +922,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) #endif Lisp_Object items; widget_value *wv, *first_wv, *prev_wv = 0; - int i, last_i = 0; + EMACS_UINT i, last_i = 0; int *submenu_start, *submenu_end; int *submenu_top_level_items, *submenu_n_panes; From a2d26660368fbe4cc7d103aad6f565e36a280fac Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 22 Mar 2011 02:08:11 -0700 Subject: [PATCH 069/166] * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow leading to a memory leak, possible in functions like load_charset_map_from_file that can allocate an unbounded number of objects. --- src/ChangeLog | 5 +++++ src/lisp.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c8fa1e55695..a341d1b4678 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-03-22 Paul Eggert + * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow + leading to a memory leak, possible in functions like + load_charset_map_from_file that can allocate an unbounded number + of objects. + * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes that could (at least in theory) be that large. diff --git a/src/lisp.h b/src/lisp.h index 645b82c80cf..e98172ec104 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3602,7 +3602,7 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object); else \ { \ buf = (type) xmalloc (size); \ - sa_must_free++; \ + sa_must_free = 1; \ record_unwind_protect (safe_alloca_unwind, \ make_save_value (buf, 0)); \ } \ @@ -3632,7 +3632,7 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object); buf = (Lisp_Object *) xmalloc (size_); \ arg_ = make_save_value (buf, nelt); \ XSAVE_VALUE (arg_)->dogc = 1; \ - sa_must_free++; \ + sa_must_free = 1; \ record_unwind_protect (safe_alloca_unwind, arg_); \ } \ } while (0) From 90346de2b2ad3e071a7f0c3bf0c7a6e7bb5b0ac0 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 22 Mar 2011 10:37:37 +0100 Subject: [PATCH 070/166] .gitignore: Add aclocal.m4, configure, lib/Makefile.in, src/config.in. --- .gitignore | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 57537b8a503..b2f17779d68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +configure +aclocal.m4 +lib/Makefile.in +src/config.in autom4te.cache makefile *~ @@ -5,5 +9,3 @@ makefile /bin/ /site-lisp/ - -# arch-tag: 75cd3c50-1875-4814-8360-190f7de38302 From 0b4e93f177fc551b8ef523ab13da7842273abad2 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 22 Mar 2011 19:30:05 +0800 Subject: [PATCH 071/166] Handle the case when re-search-backward errs because point is not located after rcirc-prompt-end-marker. --- lisp/ChangeLog | 7 +++++++ lisp/net/rcirc.el | 36 +++++++++++++++++++++--------------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 954c68c0d2f..9f9ffc7990c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-03-22 Leo Liu + + * net/rcirc.el (rcirc-completion-at-point): Return nil if point is + located before rcirc-prompt-end-marker. + (rcirc-complete): Error if point is not after rcirc prompt. + Handle the case when table is nil. + 2011-03-22 Chong Yidong * custom.el (custom--inhibit-theme-enable): Make it affect only diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 71aa0dd22bc..999a6968012 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -828,18 +828,21 @@ The list is updated automatically by `defun-rcirc-command'.") (defun rcirc-completion-at-point () "Function used for `completion-at-point-functions' in `rcirc-mode'." - (let* ((beg (save-excursion - (if (re-search-backward " " rcirc-prompt-end-marker t) - (1+ (point)) - rcirc-prompt-end-marker))) - (table (if (and (= beg rcirc-prompt-end-marker) - (eq (char-after beg) ?/)) - (delete-dups - (nconc - (sort (copy-sequence rcirc-client-commands) 'string-lessp) - (sort (copy-sequence rcirc-server-commands) 'string-lessp))) - (rcirc-channel-nicks (rcirc-buffer-process) rcirc-target)))) - (list beg (point) table))) + (and (rcirc-looking-at-input) + (let* ((beg (save-excursion + (if (re-search-backward " " rcirc-prompt-end-marker t) + (1+ (point)) + rcirc-prompt-end-marker))) + (table (if (and (= beg rcirc-prompt-end-marker) + (eq (char-after beg) ?/)) + (delete-dups + (nconc (sort (copy-sequence rcirc-client-commands) + 'string-lessp) + (sort (copy-sequence rcirc-server-commands) + 'string-lessp))) + (rcirc-channel-nicks (rcirc-buffer-process) + rcirc-target)))) + (list beg (point) table)))) (defvar rcirc-completions nil) (defvar rcirc-completion-start nil) @@ -848,6 +851,8 @@ The list is updated automatically by `defun-rcirc-command'.") "Cycle through completions from list of nicks in channel or IRC commands. IRC command completion is performed only if '/' is the first input char." (interactive) + (unless (rcirc-looking-at-input) + (error "Point not located after rcirc prompt")) (if (eq last-command this-command) (setq rcirc-completions (append (cdr rcirc-completions) (list (car rcirc-completions)))) @@ -855,9 +860,10 @@ IRC command completion is performed only if '/' is the first input char." (table (rcirc-completion-at-point))) (setq rcirc-completion-start (car table)) (setq rcirc-completions - (all-completions (buffer-substring rcirc-completion-start - (cadr table)) - (nth 2 table))))) + (and rcirc-completion-start + (all-completions (buffer-substring rcirc-completion-start + (cadr table)) + (nth 2 table)))))) (let ((completion (car rcirc-completions))) (when completion (delete-region rcirc-completion-start (point)) From 9882e21494509f28d28319e911987764ba92610d Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 22 Mar 2011 19:51:48 +0800 Subject: [PATCH 072/166] New variable rcirc-user-authenticated to pacify compiler --- lisp/ChangeLog | 1 + lisp/net/rcirc.el | 1 + 2 files changed, 2 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9f9ffc7990c..aecd90674fb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,7 @@ located before rcirc-prompt-end-marker. (rcirc-complete): Error if point is not after rcirc prompt. Handle the case when table is nil. + (rcirc-user-authenticated): Define to fix compiler warning. 2011-03-22 Chong Yidong diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 999a6968012..eb4ad01ecd7 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -491,6 +491,7 @@ If ARG is non-nil, instead prompt for connection parameters." (defvar rcirc-server nil) ; server provided by server (defvar rcirc-server-name nil) ; server name given by 001 response (defvar rcirc-timeout-timer nil) +(defvar rcirc-user-authenticated nil) (defvar rcirc-user-disconnect nil) (defvar rcirc-connecting nil) (defvar rcirc-process nil) From 5fd6245244e1ec0720a8236a90f352bc8921fa38 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 22 Mar 2011 14:10:43 +0100 Subject: [PATCH 073/166] lisp/image.el: Avoid some warnings. * image.el (image-type-file-name-regexps): Make it variable. `imagemagick-register-types' modifies it, and the user may want to add new extensions for known image types. (imagemagick-register-types): Throw error if not using ImageMagick. --- lisp/ChangeLog | 7 +++++++ lisp/image.el | 26 ++++++++++++++------------ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aecd90674fb..f2d2a21eaa4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-03-22 Juanma Barranquero + + * image.el (image-type-file-name-regexps): Make it variable. + `imagemagick-register-types' modifies it, and the user may want + to add new extensions for known image types. + (imagemagick-register-types): Throw error if not using ImageMagick. + 2011-03-22 Leo Liu * net/rcirc.el (rcirc-completion-at-point): Return nil if point is diff --git a/lisp/image.el b/lisp/image.el index 627d4c69e44..3b90ac46bd1 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -60,7 +60,7 @@ IMAGE-TYPE must be a pair (PREDICATE . TYPE). PREDICATE is called with one argument, a string containing the image data. If PREDICATE returns a non-nil value, TYPE is the image's type.") -(defconst image-type-file-name-regexps +(defvar image-type-file-name-regexps '(("\\.png\\'" . png) ("\\.gif\\'" . gif) ("\\.jpe?g\\'" . jpeg) @@ -710,17 +710,19 @@ shall be displayed." ;;;###autoload (defun imagemagick-register-types () "Register the file types that ImageMagick is able to handle." - (let ((im-types (imagemagick-types))) - (dolist (im-inhibit imagemagick-types-inhibit) - (setq im-types (remove im-inhibit im-types))) - (dolist (im-type im-types) - (let ((extension (downcase (symbol-name im-type)))) - (push - (cons (concat "\\." extension "\\'") 'image-mode) - auto-mode-alist) - (push - (cons (concat "\\." extension "\\'") 'imagemagick) - image-type-file-name-regexps))))) + (if (fboundp 'imagemagick-types) + (let ((im-types (imagemagick-types))) + (dolist (im-inhibit imagemagick-types-inhibit) + (setq im-types (remove im-inhibit im-types))) + (dolist (im-type im-types) + (let ((extension (downcase (symbol-name im-type)))) + (push + (cons (concat "\\." extension "\\'") 'image-mode) + auto-mode-alist) + (push + (cons (concat "\\." extension "\\'") 'imagemagick) + image-type-file-name-regexps)))) + (error "Emacs was not built with ImageMagick support"))) (provide 'image) From 247c22e185554cfa49736f2e587539d6a92732ed Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 22 Mar 2011 13:40:41 +0000 Subject: [PATCH 074/166] mm-view.el (mm-display-inline-fontify): Make mode optional, and call normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer query. (mm-inline-text): Render normal text with fontification whenever possible. gnus-sum.el (gnus-summary-save-parts-1): gnus-art.el (gnus-article-browse-html-save-cid-content) (gnus-article-browse-html-parts, gnus-mime-delete-part) (gnus-mime-copy-part, gnus-mime-inline-part, gnus-insert-mime-button): Use `mm-handle-filename'. mm-util.el (mm-handle-filename): New function, return the filename of an handle. --- lisp/gnus/ChangeLog | 17 +++++++++++++++++ lisp/gnus/gnus-art.el | 38 ++++++++++---------------------------- lisp/gnus/gnus-sum.el | 5 +---- lisp/gnus/mm-util.el | 7 +++++++ lisp/gnus/mm-view.el | 17 ++++++++++++----- 5 files changed, 47 insertions(+), 37 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7eca03bd93b..d728d1957b1 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,20 @@ +2011-03-21 Julien Danjou + + * mm-view.el (mm-display-inline-fontify): Make mode optional, and call + normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer + query. + (mm-inline-text): Render normal text with fontification whenever + possible. + + * gnus-sum.el (gnus-summary-save-parts-1): + * gnus-art.el (gnus-article-browse-html-save-cid-content) + (gnus-article-browse-html-parts, gnus-mime-delete-part) + (gnus-mime-copy-part, gnus-mime-inline-part, gnus-insert-mime-button): + Use `mm-handle-filename'. + + * mm-util.el (mm-handle-filename): New function, return the filename of + an handle. + 2011-03-18 Julien Danjou * gnus-util.el (gnus-buffer-live-p): Simplify gnus-buffer-live-p. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7c7e0531926..97677988f0a 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2811,14 +2811,11 @@ Return file name." ((equal (concat "<" cid ">") (mm-handle-id handle)) (setq file (expand-file-name - (or (mail-content-type-get - (mm-handle-disposition handle) 'filename) - (mail-content-type-get - (setq type (mm-handle-type handle)) 'name) - (concat - (make-temp-name "cid") - (car (rassoc (car type) mailcap-mime-extensions)))) - directory)) + (or (mm-handle-filename handle) + (concat + (make-temp-name "cid") + (car (rassoc (car (mm-handle-type handle)) mailcap-mime-extensions)))) + directory)) (mm-save-part-to-file handle file) (throw 'found file)))))))) @@ -2835,10 +2832,7 @@ message header will be added to the bodies of the \"text/html\" parts." ((or (equal (car (setq type (mm-handle-type handle))) "text/html") (and (equal (car type) "message/external-body") (or header - (setq file (or (mail-content-type-get type 'name) - (mail-content-type-get - (mm-handle-disposition handle) - 'filename)))) + (setq file (mm-handle-filename handle))) (or (mm-handle-cache handle) (condition-case code (progn (mm-extern-cache-contents handle) t) @@ -5043,14 +5037,11 @@ Deleting parts may malfunction or destroy the article; continue? ")) (let* ((data (get-text-property (point) 'gnus-data)) (id (get-text-property (point) 'gnus-part)) (handles gnus-article-mime-handles) - (none "(none)") (description (let ((desc (mm-handle-description data))) (when desc (mail-decode-encoded-word-string desc)))) - (filename - (or (mail-content-type-get (mm-handle-disposition data) 'filename) - none)) + (filename (or (mm-handle-filename (mm-handle-disposition data)) "(none)")) (type (mm-handle-media-type data))) (unless data (error "No MIME part under point")) @@ -5168,10 +5159,7 @@ are decompressed." (unless handle (setq handle (get-text-property (point) 'gnus-data))) (when handle - (let ((filename (or (mail-content-type-get (mm-handle-type handle) - 'name) - (mail-content-type-get (mm-handle-disposition handle) - 'filename))) + (let ((filename (mm-handle-filename handle)) contents dont-decode charset coding-system) (mm-with-unibyte-buffer (mm-insert-part handle) @@ -5261,12 +5249,7 @@ Compressed files like .gz and .bz2 are decompressed." (mm-with-unibyte-buffer (mm-insert-part handle) (setq contents - (or (mm-decompress-buffer - (or (mail-content-type-get (mm-handle-type handle) - 'name) - (mail-content-type-get (mm-handle-disposition handle) - 'filename)) - nil t) + (or (mm-decompress-buffer (mm-handle-filename handle) nil t) (buffer-string)))) (cond ((not arg) @@ -5671,8 +5654,7 @@ all parts." (defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed) (let ((gnus-tmp-name - (or (mail-content-type-get (mm-handle-type handle) 'name) - (mail-content-type-get (mm-handle-disposition handle) 'filename) + (or (mm-handle-filename handle) (mail-content-type-get (mm-handle-type handle) 'url) "")) (gnus-tmp-type (mm-handle-media-type handle)) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 29a98b7d11d..9b22bbe39da 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -12142,10 +12142,7 @@ If REVERSE, save parts that do not match TYPE." mm-file-name-rewrite-functions (file-name-nondirectory (or - (mail-content-type-get - (mm-handle-disposition handle) 'filename) - (mail-content-type-get - (mm-handle-type handle) 'name) + (mm-handle-filename handle) (format "%s.%d.%d" gnus-newsgroup-name (cdr gnus-article-current) gnus-summary-save-parts-counter)))) diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 435c3bba00f..d53784e8cc4 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -1667,6 +1667,13 @@ gzip, bzip2, etc. are allowed." (when decomp (kill-buffer (current-buffer))))))) +(defun mm-handle-filename (handle) + "Return filename of HANDLE if any." + (or (mail-content-type-get (mm-handle-type handle) + 'name) + (mail-content-type-get (mm-handle-disposition handle) + 'filename))) + (provide 'mm-util) ;;; mm-util.el ends here diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index d63d20239dc..39d49af0600 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -455,7 +455,7 @@ (narrow-to-region (point) (point)) (mm-insert-part handle) (goto-char (point-max))) - (insert (mm-decode-string (mm-get-part handle) charset))) + (mm-display-inline-fontify handle)) (when (and mm-fill-flowed (equal type "plain") (equal (cdr (assoc 'format (mm-handle-type handle))) @@ -565,15 +565,16 @@ (face-property 'default prop) (current-buffer)))) (delete-region ,(point-min-marker) ,(point-max-marker))))))))) -(defun mm-display-inline-fontify (handle mode) +(defun mm-display-inline-fontify (handle &optional mode) + "Insert HANDLE inline fontifying with MODE. +If MODE is not set, try to find mode automatically." (let ((charset (mail-content-type-get (mm-handle-type handle) 'charset)) text coding-system) (unless (eq charset 'gnus-decoded) (mm-with-unibyte-buffer (mm-insert-part handle) (mm-decompress-buffer - (or (mail-content-type-get (mm-handle-disposition handle) 'name) - (mail-content-type-get (mm-handle-disposition handle) 'filename)) + (mm-handle-filename handle) t t) (unless charset (setq coding-system (mm-find-buffer-file-coding-system))) @@ -601,7 +602,10 @@ (font-lock-support-mode nil) ;; I find font-lock a bit too verbose. (font-lock-verbose nil)) - (funcall mode) + (setq buffer-file-name (mm-handle-filename handle)) + (if mode + (funcall mode) + (normal-mode)) ;; The mode function might have already turned on font-lock. (unless (symbol-value 'font-lock-mode) (font-lock-fontify-buffer))) @@ -614,6 +618,9 @@ nil) nil nil nil nil nil 'text-prop)) (setq text (buffer-string)) + ;; Set buffer unmodified to avoid confirmation when killing the + ;; buffer. + (set-buffer-modified-p nil) (kill-buffer (current-buffer))) (mm-insert-inline handle text))) From 0b1596c6ad031990c4c73029d235840ad6cbb536 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 22 Mar 2011 16:15:21 +0100 Subject: [PATCH 075/166] lisp/simple.el: Avoid warning about `delete-backward-char'. --- lisp/ChangeLog | 3 +++ lisp/simple.el | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f2d2a21eaa4..c90d4e5e3ba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-03-22 Juanma Barranquero + * simple.el (backward-delete-char-untabify): + Avoid warning about using `delete-backward-char'. + * image.el (image-type-file-name-regexps): Make it variable. `imagemagick-register-types' modifies it, and the user may want to add new extensions for known image types. diff --git a/lisp/simple.el b/lisp/simple.el index 7391ff82585..bd7d5da257e 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3392,16 +3392,16 @@ and KILLP is t if a prefix arg was specified." (delete-char 1))) (forward-char -1) (setq count (1- count)))))) - (delete-backward-char - (let ((skip (cond ((eq backward-delete-char-untabify-method 'hungry) " \t") + (let* ((skip (cond ((eq backward-delete-char-untabify-method 'hungry) " \t") ((eq backward-delete-char-untabify-method 'all) - " \t\n\r")))) - (if skip - (let ((wh (- (point) (save-excursion (skip-chars-backward skip) - (point))))) - (+ arg (if (zerop wh) 0 (1- wh)))) - arg)) - killp)) + " \t\n\r"))) + (n (if skip + (let ((wh (- (point) (save-excursion (skip-chars-backward skip) + (point))))) + (+ arg (if (zerop wh) 0 (1- wh)))) + arg))) + ;; Avoid warning about delete-backward-char + (with-no-warnings (delete-backward-char n killp)))) (defun zap-to-char (arg char) "Kill up to and including ARGth occurrence of CHAR. From 4b978a677c2f684d7988cdd2dccb73d109c6bb1e Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 22 Mar 2011 23:38:40 +0800 Subject: [PATCH 076/166] Use utf-8 if safe for writing to abbrev file and fall back on emacs-mule or utf-8-emacs. --- lisp/ChangeLog | 6 ++++++ lisp/abbrev.el | 36 ++++++++++++++++++++++-------------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c90d4e5e3ba..6b7dd5a0463 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-22 Leo Liu + + * abbrev.el (write-abbrev-file): Use utf-8 for writing if it can + encode all chars in abbrevs; otherwise use emacs-mule or + utf-8-emacs. (Bug#8308) + 2011-03-22 Juanma Barranquero * simple.el (backward-delete-char-untabify): diff --git a/lisp/abbrev.el b/lisp/abbrev.el index fbca214a649..3b383a5f5b8 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -225,21 +225,29 @@ specified in `abbrev-file-name' is used." abbrev-file-name))) (or (and file (> (length file) 0)) (setq file abbrev-file-name)) - (let ((coding-system-for-write 'emacs-mule)) - (with-temp-file file - (insert ";;-*-coding: emacs-mule;-*-\n") + (let ((coding-system-for-write 'utf-8)) + (with-temp-buffer (dolist (table - ;; We sort the table in order to ease the automatic - ;; merging of different versions of the user's abbrevs - ;; file. This is useful, for example, for when the - ;; user keeps their home directory in a revision - ;; control system, and is therefore keeping multiple - ;; slightly-differing copies loosely synchronized. - (sort (copy-sequence abbrev-table-name-list) - (lambda (s1 s2) - (string< (symbol-name s1) - (symbol-name s2))))) - (insert-abbrev-table-description table nil))))) + ;; We sort the table in order to ease the automatic + ;; merging of different versions of the user's abbrevs + ;; file. This is useful, for example, for when the + ;; user keeps their home directory in a revision + ;; control system, and is therefore keeping multiple + ;; slightly-differing copies loosely synchronized. + (sort (copy-sequence abbrev-table-name-list) + (lambda (s1 s2) + (string< (symbol-name s1) + (symbol-name s2))))) + (insert-abbrev-table-description table nil)) + (when (unencodable-char-position (point-min) (point-max) 'utf-8) + (setq coding-system-for-write + (if (> emacs-major-version 24) + 'utf-8-emacs + ;; For compatibility with Emacs 22 (See Bug#8308) + 'emacs-mule))) + (goto-char (point-min)) + (insert (format ";;-*-coding: %s;-*-\n" coding-system-for-write)) + (write-region nil nil file nil 0)))) (defun add-mode-abbrev (arg) "Define mode-specific abbrev for last word(s) before point. From 8abc3f12955673bdb367b2de5556ff66f202d2d0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 22 Mar 2011 09:20:45 -0700 Subject: [PATCH 077/166] * coding.c (encode_coding_raw_text): Avoid unnecessary test the first time through the loop, since we know p0 < p1 then. This also avoids a gcc -Wstrict-overflow warning. --- src/ChangeLog | 4 ++++ src/coding.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a341d1b4678..45982f607f4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-22 Paul Eggert + * coding.c (encode_coding_raw_text): Avoid unnecessary test + the first time through the loop, since we know p0 < p1 then. + This also avoids a gcc -Wstrict-overflow warning. + * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow leading to a memory leak, possible in functions like load_charset_map_from_file that can allocate an unbounded number diff --git a/src/coding.c b/src/coding.c index 0c2836c19f6..0596d16bf46 100644 --- a/src/coding.c +++ b/src/coding.c @@ -5266,11 +5266,12 @@ encode_coding_raw_text (struct coding_system *coding) unsigned char str[MAX_MULTIBYTE_LENGTH], *p0 = str, *p1 = str; CHAR_STRING_ADVANCE (c, p1); - while (p0 < p1) + do { EMIT_ONE_BYTE (*p0); p0++; } + while (p0 < p1); } } else From b12ef4116793ce9cc422c22d98b02261995df143 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 22 Mar 2011 09:43:12 -0700 Subject: [PATCH 078/166] Add Bug# --- src/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 45982f607f4..7e9bec9b6e9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,7 +7,7 @@ * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow leading to a memory leak, possible in functions like load_charset_map_from_file that can allocate an unbounded number - of objects. + of objects (Bug#8318). * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes that could (at least in theory) be that large. From c59da222fa57399540a7c3d13c88209336cc5d01 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 22 Mar 2011 14:15:52 -0400 Subject: [PATCH 079/166] Remove an apparently unnecessary XClearWindow call. * src/xterm.c (x_clear_frame): Remove XClearWindow call. This appears not to be necessary, and produces flickering. --- src/ChangeLog | 5 +++++ src/xterm.c | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6fa2d821565..f489a233683 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-22 Chong Yidong + + * xterm.c (x_clear_frame): Remove XClearWindow call. This appears + not to be necessary, and produces flickering. + 2011-03-20 Glenn Morris * config.in: Remove file. diff --git a/src/xterm.c b/src/xterm.c index fd7ffd68e62..f87c22912a4 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2928,10 +2928,14 @@ x_clear_frame (struct frame *f) /* We don't set the output cursor here because there will always follow an explicit cursor_to. */ BLOCK_INPUT; - XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); - /* We have to clear the scroll bars, too. If we have changed - colors or something like that, then they should be notified. */ + /* The following calls have been commented out because they do not + seem to accomplish anything, apart from causing flickering during + window resize. */ + /* XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); */ + + /* We have to clear the scroll bars. If we have changed colors or + something like that, then they should be notified. */ x_scroll_bar_clear (f); #if defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS) From 6508470910c69fd647547b55191b29aea341f593 Mon Sep 17 00:00:00 2001 From: Sebastian Hermida Date: Tue, 22 Mar 2011 14:59:50 -0400 Subject: [PATCH 080/166] * etc/themes/misterioso-theme.el: New file. --- etc/ChangeLog | 4 ++ etc/themes/misterioso-theme.el | 110 +++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 etc/themes/misterioso-theme.el diff --git a/etc/ChangeLog b/etc/ChangeLog index 53cd307e3cc..b4a3d6d6ae7 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2011-03-22 Sebastian Hermida + + * themes/misterioso-theme.el: New file. + 2011-03-16 Juanma Barranquero * NEWS: Document warning about _emacs. diff --git a/etc/themes/misterioso-theme.el b/etc/themes/misterioso-theme.el new file mode 100644 index 00000000000..864d31d9b09 --- /dev/null +++ b/etc/themes/misterioso-theme.el @@ -0,0 +1,110 @@ +;;; misterioso-theme.el --- Custom face theme for Emacs + +;; Copyright (C) 2011 Free Software Foundation, Inc. + +;; Author: Sebastian Hermida + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(deftheme misterioso + "Theme for faces, using light colors on a dark gray background.") + +(let ((class '((class color) (min-colors 89)))) + + (custom-theme-set-faces + 'misterioso + ;; Ensure sufficient contrast on 256-color xterms. + `(default ((((class color) (min-colors 4096)) + (:background "#2d3743" :foreground "#e1e1e0")) + (,class + (:background "#3a3a3a" :foreground "#e1e1e0")))) + `(cursor ((,class (:background "#415160" :foreground "#415160")))) + ;; Highlighting faces + `(fringe ((,class (:background "#2e3748")))) + `(highlight ((,class (:background "#338f86" :foreground "#e1e1e0")))) + `(region ((,class (:background "#2d4948" :foreground "#e1e1e0")))) + `(isearch ((,class (:background "#fcffad" :foreground "#000000")))) + `(lazy-highlight ((,class (:background "#338f86")))) + `(trailing-whitespace ((,class (:background "#ff4242")))) + ;; Mode line faces + `(mode-line ((,class (:background "#212931" :foreground "#eeeeec")))) + `(mode-line-inactive + ((,class (:background "#878787" :foreground "#eeeeec")))) + `(header-line ((,class (:background "#e5e5e5" :foreground "#333333")))) + ;; Escape and prompt faces + `(minibuffer-prompt ((,class (:foreground "#729fcf" :weight bold)))) + ;; Font lock faces + `(font-lock-builtin-face ((,class (:foreground "#23d7d7")))) + `(font-lock-comment-face ((,class (:foreground "#74af68")))) + `(font-lock-constant-face ((,class (:foreground "#008b8b")))) + `(font-lock-function-name-face + ((,class (:foreground "#00ede1" :weight bold)))) + `(font-lock-keyword-face ((,class (:foreground "#ffad29" :weight bold)))) + `(font-lock-string-face ((,class (:foreground "#e67128")))) + `(font-lock-type-face ((,class (:foreground "#34cae2")))) + `(font-lock-variable-name-face ((,class (:foreground "#dbdb95")))) + `(font-lock-warning-face ((,class (:foreground "#ff4242" :weight bold)))) + ;; Buttons and links + `(button ((,class (:underline t)))) + `(link ((,class (:foreground "#59e9ff" :underline t)))) + `(link-visited ((,class (:foreground "#ed74cd" :underline t)))) + ;; Gnus faces + `(gnus-group-news-1 ((,class (:foreground "#ff4242" :weight bold)))) + `(gnus-group-news-1-low ((,class (:foreground "#ff4242")))) + `(gnus-group-news-2 ((,class (:foreground "#00ede1" :weight bold)))) + `(gnus-group-news-2-low ((,class (:foreground "#00ede1")))) + `(gnus-group-news-3 ((,class (:foreground "#23d7d7" :weight bold)))) + `(gnus-group-news-3-low ((,class (:foreground "#23d7d7")))) + `(gnus-group-news-4 ((,class (:foreground "#74af68" :weight bold)))) + `(gnus-group-news-4-low ((,class (:foreground "#74af68")))) + `(gnus-group-news-5 ((,class (:foreground "#dbdb95" :weight bold)))) + `(gnus-group-news-5-low ((,class (:foreground "#dbdb95")))) + `(gnus-group-news-low ((,class (:foreground "#008b8b")))) + `(gnus-group-mail-1 ((,class (:foreground "#ff4242" :weight bold)))) + `(gnus-group-mail-1-low ((,class (:foreground "#ff4242")))) + `(gnus-group-mail-2 ((,class (:foreground "#00ede1" :weight bold)))) + `(gnus-group-mail-2-low ((,class (:foreground "#00ede1")))) + `(gnus-group-mail-3 ((,class (:foreground "#23d7d7" :weight bold)))) + `(gnus-group-mail-3-low ((,class (:foreground "#23d7d7")))) + `(gnus-group-mail-low ((,class (:foreground "#008b8b")))) + `(gnus-header-content ((,class (:weight normal :foreground "#ffad29")))) + `(gnus-header-from ((,class (:foreground "#e67128" :weight bold)))) + `(gnus-header-subject ((,class (:foreground "#dbdb95")))) + `(gnus-header-name ((,class (:foreground "#00ede1")))) + `(gnus-header-newsgroups ((,class (:foreground "#e67128")))) + ;; Message faces + `(message-header-name ((,class (:foreground "#ffad29" :weight bold)))) + `(message-header-cc ((,class (:foreground "#e67128")))) + `(message-header-other ((,class (:foreground "#e67128")))) + `(message-header-subject ((,class (:foreground "#dbdb95")))) + `(message-header-to ((,class (:foreground "#00ede1")))) + `(message-cited-text ((,class (:foreground "#74af68")))) + `(message-separator ((,class (:foreground "#23d7d7")))))) + +(custom-theme-set-variables + 'misterioso + '(ansi-color-names-vector ["#2d3743" "#ff4242" "#74af68" "#dbdb95" + "#34cae2" "#008b8b" "#00ede1" "#e1e1e0"])) + +(provide-theme 'misterioso) + +;; Local Variables: +;; no-byte-compile: t +;; End: + +;;; misterioso-theme.el ends here From 9d0da923ebd2b78abb6e02f0b90cfe9d818eb301 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 22 Mar 2011 21:58:27 +0100 Subject: [PATCH 081/166] lisp/emacs-lisp/derived.el: Don't warn about keymaps already `defconst'ed. --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/derived.el | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6b7dd5a0463..e508174e118 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-22 Juanma Barranquero + + * emacs-lisp/derived.el (define-derived-mode): Wrap declaration of + keymap variable in `with-no-warnings' to avoid a warning when the + keymap has been already `defconst'ed. + 2011-03-22 Leo Liu * abbrev.el (write-abbrev-file): Use utf-8 for writing if it can diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 425a77ee77f..1db98ac39c8 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -201,7 +201,7 @@ No problems result if this variable is not bound. name)))) (unless (boundp ',map) (put ',map 'definition-name ',child)) - (defvar ,map (make-sparse-keymap)) + (with-no-warnings (defvar ,map (make-sparse-keymap))) (unless (get ',map 'variable-documentation) (put ',map 'variable-documentation (purecopy ,(format "Keymap for `%s'." child)))) From b9b4b7cb4c27f9f6ad644168f0e1241e5c0d6eaa Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 22 Mar 2011 17:53:37 -0700 Subject: [PATCH 082/166] Merge removals from trunk. --- aclocal.m4 | 1017 --- configure | 21661 ---------------------------------------------- lib/Makefile.in | 1492 ---- src/config.in | 1400 --- 4 files changed, 25570 deletions(-) delete mode 100644 aclocal.m4 delete mode 100755 configure delete mode 100644 lib/Makefile.in delete mode 100644 src/config.in diff --git a/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index 370be46f0e0..00000000000 --- a/aclocal.m4 +++ /dev/null @@ -1,1017 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([m4/00gnulib.m4]) -m4_include([m4/c-strtod.m4]) -m4_include([m4/extensions.m4]) -m4_include([m4/filemode.m4]) -m4_include([m4/getloadavg.m4]) -m4_include([m4/getopt.m4]) -m4_include([m4/gl-comp.m4]) -m4_include([m4/gnulib-common.m4]) -m4_include([m4/include_next.m4]) -m4_include([m4/longlong.m4]) -m4_include([m4/lstat.m4]) -m4_include([m4/md5.m4]) -m4_include([m4/mktime.m4]) -m4_include([m4/multiarch.m4]) -m4_include([m4/readlink.m4]) -m4_include([m4/socklen.m4]) -m4_include([m4/st_dm_mode.m4]) -m4_include([m4/stat.m4]) -m4_include([m4/stdbool.m4]) -m4_include([m4/stddef_h.m4]) -m4_include([m4/stdint.m4]) -m4_include([m4/stdio_h.m4]) -m4_include([m4/stdlib_h.m4]) -m4_include([m4/strftime.m4]) -m4_include([m4/symlink.m4]) -m4_include([m4/sys_stat_h.m4]) -m4_include([m4/time_h.m4]) -m4_include([m4/time_r.m4]) -m4_include([m4/tm_gmtoff.m4]) -m4_include([m4/unistd_h.m4]) -m4_include([m4/wchar_t.m4]) diff --git a/configure b/configure deleted file mode 100755 index bdcd212d8e5..00000000000 --- a/configure +++ /dev/null @@ -1,21661 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for emacs 24.0.50. -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='emacs' -PACKAGE_TARNAME='emacs' -PACKAGE_VERSION='24.0.50' -PACKAGE_STRING='emacs 24.0.50' -PACKAGE_BUGREPORT='' -PACKAGE_URL='' - -ac_unique_file="src/lisp.h" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_header_list= -gl_getopt_required=POSIX -gl_getopt_required=POSIX -ac_func_list= -ac_subst_vars='gltests_LTLIBOBJS -gltests_LIBOBJS -gl_LTLIBOBJS -gl_LIBOBJS -am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -WINDOW_SUPPORT -TOOLTIP_SUPPORT -MOUSE_SUPPORT -LIB_GCC -LD_FIRSTFLAG -LD_SWITCH_SYSTEM_TEMACS -POST_ALLOC_OBJ -PRE_ALLOC_OBJ -CYGWIN_OBJ -RALLOC_OBJ -OLDXMENU_DEPS -LIBX_OTHER -LIBXMENU -OLDXMENU -OLDXMENU_TARGET -LIBXT_OTHER -TOOLKIT_LIBW -WIDGET_OBJ -XOBJ -XMENU_OBJ -FONT_OBJ -OTHER_FILES -GNU_OBJC_CFLAGS -ns_appsrc -ns_appresdir -ns_appbindir -ns_appdir -S_FILE -M_FILE -X_TOOLKIT_TYPE -C_SWITCH_X_SYSTEM -C_SWITCH_X_SITE -LD_SWITCH_X_SITE -gameuser -gamedir -bitmapdir -archlibdir -etcdir -x_default_search_path -lisppath -locallisppath -lispdir -srcdir -canonical -configuration -version -KRB4LIB -DESLIB -KRB5LIB -CRYPTOLIB -COM_ERRLIB -LIBRESOLV -LIBHESIOD -TERMCAP_OBJ -LIBS_TERMCAP -LIBGNU_LTLIBDEPS -LIBGNU_LIBDEPS -gltests_WITNESS -HAVE_UNISTD_H -NEXT_AS_FIRST_DIRECTIVE_UNISTD_H -NEXT_UNISTD_H -PTHREAD_H_DEFINES_STRUCT_TIMESPEC -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC -TIME_H_DEFINES_STRUCT_TIMESPEC -NEXT_AS_FIRST_DIRECTIVE_TIME_H -NEXT_TIME_H -NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H -NEXT_SYS_STAT_H -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H -NEXT_STDLIB_H -NEXT_AS_FIRST_DIRECTIVE_STDIO_H -NEXT_STDIO_H -REPLACE_VSPRINTF -REPLACE_VSNPRINTF -REPLACE_VPRINTF -REPLACE_VFPRINTF -REPLACE_VDPRINTF -REPLACE_VASPRINTF -REPLACE_TMPFILE -REPLACE_STDIO_WRITE_FUNCS -REPLACE_SPRINTF -REPLACE_SNPRINTF -REPLACE_RENAMEAT -REPLACE_RENAME -REPLACE_REMOVE -REPLACE_PRINTF -REPLACE_POPEN -REPLACE_PERROR -REPLACE_OBSTACK_PRINTF -REPLACE_GETLINE -REPLACE_GETDELIM -REPLACE_FTELLO -REPLACE_FTELL -REPLACE_FSEEKO -REPLACE_FSEEK -REPLACE_FREOPEN -REPLACE_FPURGE -REPLACE_FPRINTF -REPLACE_FOPEN -REPLACE_FFLUSH -REPLACE_FCLOSE -REPLACE_DPRINTF -HAVE_VDPRINTF -HAVE_VASPRINTF -HAVE_RENAMEAT -HAVE_FTELLO -HAVE_FSEEKO -HAVE_DPRINTF -HAVE_DECL_VSNPRINTF -HAVE_DECL_SNPRINTF -HAVE_DECL_OBSTACK_PRINTF -HAVE_DECL_GETLINE -HAVE_DECL_GETDELIM -HAVE_DECL_FTELLO -HAVE_DECL_FSEEKO -HAVE_DECL_FPURGE -GNULIB_VSPRINTF_POSIX -GNULIB_VSNPRINTF -GNULIB_VPRINTF_POSIX -GNULIB_VPRINTF -GNULIB_VFPRINTF_POSIX -GNULIB_VFPRINTF -GNULIB_VDPRINTF -GNULIB_VASPRINTF -GNULIB_TMPFILE -GNULIB_STDIO_H_SIGPIPE -GNULIB_SPRINTF_POSIX -GNULIB_SNPRINTF -GNULIB_RENAMEAT -GNULIB_RENAME -GNULIB_REMOVE -GNULIB_PUTS -GNULIB_PUTCHAR -GNULIB_PUTC -GNULIB_PRINTF_POSIX -GNULIB_PRINTF -GNULIB_POPEN -GNULIB_PERROR -GNULIB_OBSTACK_PRINTF_POSIX -GNULIB_OBSTACK_PRINTF -GNULIB_GETLINE -GNULIB_GETDELIM -GNULIB_FWRITE -GNULIB_FTELLO -GNULIB_FTELL -GNULIB_FSEEKO -GNULIB_FSEEK -GNULIB_FREOPEN -GNULIB_FPUTS -GNULIB_FPUTC -GNULIB_FPURGE -GNULIB_FPRINTF_POSIX -GNULIB_FPRINTF -GNULIB_FOPEN -GNULIB_FFLUSH -GNULIB_FCLOSE -GNULIB_DPRINTF -STDINT_H -WINT_T_SUFFIX -WCHAR_T_SUFFIX -SIG_ATOMIC_T_SUFFIX -SIZE_T_SUFFIX -PTRDIFF_T_SUFFIX -HAVE_SIGNED_WINT_T -HAVE_SIGNED_WCHAR_T -HAVE_SIGNED_SIG_ATOMIC_T -BITSIZEOF_WINT_T -BITSIZEOF_WCHAR_T -BITSIZEOF_SIG_ATOMIC_T -BITSIZEOF_SIZE_T -BITSIZEOF_PTRDIFF_T -HAVE_SYS_BITYPES_H -HAVE_SYS_INTTYPES_H -HAVE_STDINT_H -NEXT_AS_FIRST_DIRECTIVE_STDINT_H -NEXT_STDINT_H -HAVE_SYS_TYPES_H -HAVE_INTTYPES_H -HAVE_WCHAR_H -HAVE_UNSIGNED_LONG_LONG_INT -HAVE_LONG_LONG_INT -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H -NEXT_STDDEF_H -STDDEF_H -HAVE_WCHAR_T -REPLACE_NULL -HAVE__BOOL -STDBOOL_H -APPLE_UNIVERSAL_BUILD -REPLACE_TIMEGM -REPLACE_NANOSLEEP -REPLACE_MKTIME -REPLACE_LOCALTIME_R -HAVE_TIMEGM -HAVE_STRPTIME -HAVE_NANOSLEEP -HAVE_DECL_LOCALTIME_R -GNULIB_TIME_R -GNULIB_TIMEGM -GNULIB_STRPTIME -GNULIB_NANOSLEEP -GNULIB_MKTIME -REPLACE_UTIMENSAT -REPLACE_STAT -REPLACE_MKNOD -REPLACE_MKFIFO -REPLACE_MKDIR -REPLACE_LSTAT -REPLACE_FUTIMENS -REPLACE_FSTATAT -REPLACE_FSTAT -HAVE_UTIMENSAT -HAVE_MKNODAT -HAVE_MKNOD -HAVE_MKFIFOAT -HAVE_MKFIFO -HAVE_MKDIRAT -HAVE_LSTAT -HAVE_LCHMOD -HAVE_FUTIMENS -HAVE_FSTATAT -HAVE_FCHMODAT -GNULIB_UTIMENSAT -GNULIB_STAT -GNULIB_MKNODAT -GNULIB_MKNOD -GNULIB_MKFIFOAT -GNULIB_MKFIFO -GNULIB_MKDIRAT -GNULIB_LSTAT -GNULIB_LCHMOD -GNULIB_FUTIMENS -GNULIB_FSTATAT -GNULIB_FCHMODAT -LTLIBINTL -LIBINTL -GETOPT_H -HAVE_GETOPT_H -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H -NEXT_GETOPT_H -PRAGMA_COLUMNS -PRAGMA_SYSTEM_HEADER -INCLUDE_NEXT_AS_FIRST_DIRECTIVE -INCLUDE_NEXT -UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS -UNISTD_H_HAVE_WINSOCK2_H -REPLACE_WRITE -REPLACE_USLEEP -REPLACE_UNLINKAT -REPLACE_UNLINK -REPLACE_TTYNAME_R -REPLACE_SYMLINK -REPLACE_SLEEP -REPLACE_RMDIR -REPLACE_READLINK -REPLACE_PWRITE -REPLACE_PREAD -REPLACE_LSEEK -REPLACE_LINKAT -REPLACE_LINK -REPLACE_LCHOWN -REPLACE_GETPAGESIZE -REPLACE_GETGROUPS -REPLACE_GETLOGIN_R -REPLACE_GETDOMAINNAME -REPLACE_GETCWD -REPLACE_FCHOWNAT -REPLACE_DUP2 -REPLACE_DUP -REPLACE_CLOSE -REPLACE_CHOWN -HAVE_SYS_PARAM_H -HAVE_OS_H -HAVE_DECL_TTYNAME_R -HAVE_DECL_GETUSERSHELL -HAVE_DECL_GETPAGESIZE -HAVE_DECL_GETLOGIN_R -HAVE_DECL_GETDOMAINNAME -HAVE_DECL_FCHDIR -HAVE_DECL_ENVIRON -HAVE_USLEEP -HAVE_UNLINKAT -HAVE_SYMLINKAT -HAVE_SYMLINK -HAVE_SLEEP -HAVE_READLINKAT -HAVE_READLINK -HAVE_PWRITE -HAVE_PREAD -HAVE_PIPE2 -HAVE_PIPE -HAVE_LINKAT -HAVE_LINK -HAVE_LCHOWN -HAVE_GETPAGESIZE -HAVE_GETLOGIN -HAVE_GETHOSTNAME -HAVE_GETGROUPS -HAVE_GETDTABLESIZE -HAVE_FTRUNCATE -HAVE_FSYNC -HAVE_FCHOWNAT -HAVE_FCHDIR -HAVE_FACCESSAT -HAVE_EUIDACCESS -HAVE_DUP3 -HAVE_DUP2 -HAVE_CHOWN -GNULIB_WRITE -GNULIB_USLEEP -GNULIB_UNLINKAT -GNULIB_UNLINK -GNULIB_UNISTD_H_SIGPIPE -GNULIB_UNISTD_H_GETOPT -GNULIB_TTYNAME_R -GNULIB_SYMLINKAT -GNULIB_SYMLINK -GNULIB_SLEEP -GNULIB_RMDIR -GNULIB_READLINKAT -GNULIB_READLINK -GNULIB_PWRITE -GNULIB_PREAD -GNULIB_PIPE2 -GNULIB_PIPE -GNULIB_LSEEK -GNULIB_LINKAT -GNULIB_LINK -GNULIB_LCHOWN -GNULIB_GETUSERSHELL -GNULIB_GETPAGESIZE -GNULIB_GETLOGIN_R -GNULIB_GETLOGIN -GNULIB_GETHOSTNAME -GNULIB_GETGROUPS -GNULIB_GETDTABLESIZE -GNULIB_GETDOMAINNAME -GNULIB_GETCWD -GNULIB_FTRUNCATE -GNULIB_FSYNC -GNULIB_FCHOWNAT -GNULIB_FCHDIR -GNULIB_FACCESSAT -GNULIB_EUIDACCESS -GNULIB_ENVIRON -GNULIB_DUP3 -GNULIB_DUP2 -GNULIB_CLOSE -GNULIB_CHOWN -GETLOADAVG_LIBS -REPLACE_WCTOMB -REPLACE_UNSETENV -REPLACE_STRTOD -REPLACE_SETENV -REPLACE_REALPATH -REPLACE_REALLOC -REPLACE_PUTENV -REPLACE_MKSTEMP -REPLACE_MBTOWC -REPLACE_MALLOC -REPLACE_CANONICALIZE_FILE_NAME -REPLACE_CALLOC -HAVE_DECL_UNSETENV -HAVE_UNLOCKPT -HAVE_SYS_LOADAVG_H -HAVE_STRUCT_RANDOM_DATA -HAVE_STRTOULL -HAVE_STRTOLL -HAVE_STRTOD -HAVE_DECL_SETENV -HAVE_SETENV -HAVE_RPMATCH -HAVE_REALPATH -HAVE_RANDOM_R -HAVE_RANDOM_H -HAVE_PTSNAME -HAVE_MKSTEMPS -HAVE_MKSTEMP -HAVE_MKOSTEMPS -HAVE_MKOSTEMP -HAVE_MKDTEMP -HAVE_GRANTPT -HAVE_GETSUBOPT -HAVE_DECL_GETLOADAVG -HAVE_CANONICALIZE_FILE_NAME -HAVE_ATOLL -HAVE__EXIT -GNULIB_WCTOMB -GNULIB_UNSETENV -GNULIB_UNLOCKPT -GNULIB_SYSTEM_POSIX -GNULIB_STRTOULL -GNULIB_STRTOLL -GNULIB_STRTOD -GNULIB_SETENV -GNULIB_RPMATCH -GNULIB_REALPATH -GNULIB_REALLOC_POSIX -GNULIB_RANDOM_R -GNULIB_PUTENV -GNULIB_PTSNAME -GNULIB_MKSTEMPS -GNULIB_MKSTEMP -GNULIB_MKOSTEMPS -GNULIB_MKOSTEMP -GNULIB_MKDTEMP -GNULIB_MBTOWC -GNULIB_MALLOC_POSIX -GNULIB_GRANTPT -GNULIB_GETSUBOPT -GNULIB_GETLOADAVG -GNULIB_CANONICALIZE_FILE_NAME -GNULIB_CALLOC_POSIX -GNULIB_ATOLL -GNULIB__EXIT -GL_COND_LIBTOOL_FALSE -GL_COND_LIBTOOL_TRUE -BLESSMAIL_TARGET -LIBS_MAIL -liblockfile -ALLOCA -LIBXML2_LIBS -LIBXML2_CFLAGS -LIBXSM -LIBGPM -LIBGIF -LIBTIFF -LIBPNG -LIBJPEG -LIBXPM -M17N_FLT_LIBS -M17N_FLT_CFLAGS -LIBOTF_LIBS -LIBOTF_CFLAGS -FREETYPE_LIBS -FREETYPE_CFLAGS -XFT_LIBS -XFT_CFLAGS -FONTCONFIG_LIBS -FONTCONFIG_CFLAGS -LIBXMU -LIBXTR6 -LIBGNUTLS_LIBS -LIBGNUTLS_CFLAGS -LIBSELINUX_LIBS -GCONF_LIBS -GCONF_CFLAGS -DBUS_OBJ -DBUS_LIBS -DBUS_CFLAGS -GTK_OBJ -GTK_LIBS -GTK_CFLAGS -IMAGEMAGICK_LIBS -IMAGEMAGICK_CFLAGS -RSVG_LIBS -RSVG_CFLAGS -VMLIMIT_OBJ -GMALLOC_OBJ -HAVE_XSERVER -LIB_STANDARD -NS_SUPPORT -NS_OBJC_OBJ -NS_OBJ -TEMACS_LDFLAGS2 -LD_SWITCH_X_SITE_AUX_RPATH -LD_SWITCH_X_SITE_AUX -XMKMF -DEPFLAGS -MKDEPDIR -CFLAGS_SOUND -ALSA_LIBS -ALSA_CFLAGS -PKG_CONFIG -LIBSOUND -START_FILES -LIB_MATH -CRT_DIR -LIBS_SYSTEM -C_SWITCH_SYSTEM -UNEXEC_OBJ -C_SWITCH_MACHINE -LD_SWITCH_SYSTEM -CANNOT_DUMP -HAVE_MAKEINFO -GZIP_PROG -INSTALL_INFO -C_WARNINGS_SWITCH -EGREP -GREP -CPP -RANLIB -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -PROFILING_CFLAGS -MAINT -GZIP_INFO -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='deps_frag -ns_frag' -ac_user_opts=' -enable_option_checking -with_pop -with_kerberos -with_kerberos5 -with_hesiod -with_mmdf -with_mail_unlink -with_mailhost -with_sound -with_sync_input -with_x_toolkit -with_xpm -with_jpeg -with_tiff -with_gif -with_png -with_rsvg -with_xml2 -with_imagemagick -with_xft -with_libotf -with_m17n_flt -with_toolkit_scroll_bars -with_xaw3d -with_xim -with_ns -with_gpm -with_dbus -with_gconf -with_selinux -with_gnutls -with_makeinfo -with_compress_info -with_pkg_config_prog -with_crt_dir -with_gameuser -with_gnustep_conf -enable_ns_self_contained -enable_asserts -enable_maintainer_mode -enable_locallisppath -enable_checking -enable_use_lisp_union_type -enable_profiling -enable_autodepend -enable_dependency_tracking -enable_largefile -with_x -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -XMKMF' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures emacs 24.0.50 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/emacs] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -X features: - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of emacs 24.0.50:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-ns-self-contained - disable self contained build under NeXTstep - --enable-asserts compile code with asserts enabled - --enable-maintainer-mode - enable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --enable-locallisppath=PATH - directories Emacs should search for lisp files - specific to this site - --enable-checking[=LIST] - enable expensive run-time checks. With LIST, enable - only specific categories of checks. Categories are: - all,yes,no. Flags are: stringbytes, stringoverrun, - stringfreelist, xmallocoverrun, conslist - --enable-use-lisp-union-type - use a union for the Lisp_Object data type. This is - only useful for development for catching certain - types of bugs. - --enable-profiling build emacs with profiling support. This might not - work on all platforms - --enable-autodepend automatically generate dependencies to .h-files. - Requires GNU Make and Gcc. Enabled if GNU Make and - Gcc is found - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --disable-largefile omit support for large files - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --without-pop don't support POP mail retrieval with movemail - --with-kerberos support Kerberos-authenticated POP - --with-kerberos5 support Kerberos version 5 authenticated POP - --with-hesiod support Hesiod to get the POP server host - --with-mmdf support MMDF mailboxes - --with-mail-unlink unlink, rather than empty, mail spool after reading - --with-mailhost=HOSTNAME - string giving default POP mail host - --without-sound don't compile with sound support - --without-sync-input process async input synchronously - --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3, - lucid or athena, motif, no) - --without-xpm don't compile with XPM image support - --without-jpeg don't compile with JPEG image support - --without-tiff don't compile with TIFF image support - --without-gif don't compile with GIF image support - --without-png don't compile with PNG image support - --without-rsvg don't compile with SVG image support - --without-xml2 don't compile with XML parsing support - --without-imagemagick don't compile with ImageMagick image support - --without-xft don't use XFT for anti aliased fonts - --without-libotf don't use libotf for OpenType font support - --without-m17n-flt don't use m17n-flt for text shaping - --without-toolkit-scroll-bars - don't use Motif or Xaw3d scroll bars - --without-xaw3d don't use Xaw3d - --without-xim don't use X11 XIM - --with-ns use NeXTstep (Cocoa or GNUstep) windowing system - --without-gpm don't use -lgpm for mouse support on a GNU/Linux - console - --without-dbus don't compile with D-Bus support - --without-gconf don't compile with GConf support - --without-selinux don't compile with SELinux support - --without-gnutls don't use -lgnutls for SSL/TLS support - --without-makeinfo don't require makeinfo for building manuals - --without-compress-info don't compress the installed Info pages - --with-pkg-config-prog=PATH - path to pkg-config for finding GTK and librsvg - --with-crt-dir=DIR directory containing crtn.o etc. The default is - /usr/lib, or /usr/lib64 on some platforms. - --with-gameuser=USER user for shared game score files - --with-gnustep-conf=PATH - path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, - or /etc/GNUstep/GNUstep.conf - --with-x use the X Window System - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - XMKMF Path to xmkmf, Makefile generator for X Window System - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -emacs configure 24.0.50 -generated by GNU Autoconf 2.68 - -Copyright (C) 2010 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_decl - -# ac_fn_c_check_header_preproc LINENO HEADER VAR -# ---------------------------------------------- -# Tests whether HEADER is present, setting the cache variable VAR accordingly. -ac_fn_c_check_header_preproc () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f conftest.err conftest.i conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_preproc - -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_member - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.68. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -as_fn_append ac_header_list " stdlib.h" -as_fn_append ac_header_list " unistd.h" -as_fn_append ac_header_list " sys/param.h" -gl_getopt_required=GNU -as_fn_append ac_header_list " getopt.h" -as_fn_append ac_func_list " lstat" -as_fn_append ac_func_list " alarm" -as_fn_append ac_func_list " readlink" -as_fn_append ac_header_list " sys/socket.h" -as_fn_append ac_header_list " wchar.h" -as_fn_append ac_header_list " stdint.h" -as_fn_append ac_func_list " tzset" -as_fn_append ac_func_list " symlink" -as_fn_append ac_header_list " sys/stat.h" -as_fn_append ac_header_list " sys/time.h" -as_fn_append ac_func_list " localtime_r" -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_config_headers="$ac_config_headers src/config.h:src/config.in" - - -am__api_version='1.11' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='emacs' - VERSION='24.0.50' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - - - -lispdir='${datadir}/emacs/${version}/lisp' -locallisppath='${datadir}/emacs/${version}/site-lisp:'\ -'${datadir}/emacs/site-lisp' -lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim' -etcdir='${datadir}/emacs/${version}/etc' -archlibdir='${libexecdir}/emacs/${version}/${configuration}' -docdir='${datadir}/emacs/${version}/etc' -gamedir='${localstatedir}/games/emacs' - - - - -# Check whether --with-pop was given. -if test "${with_pop+set}" = set; then : - withval=$with_pop; -else - with_pop=yes -fi - -if test "$with_pop" = yes; then - $as_echo "#define MAIL_USE_POP 1" >>confdefs.h - -fi - - -# Check whether --with-kerberos was given. -if test "${with_kerberos+set}" = set; then : - withval=$with_kerberos; -else - with_kerberos=no -fi - -if test "$with_kerberos" != no; then - $as_echo "#define KERBEROS 1" >>confdefs.h - -fi - - -# Check whether --with-kerberos5 was given. -if test "${with_kerberos5+set}" = set; then : - withval=$with_kerberos5; -else - with_kerberos5=no -fi - -if test "${with_kerberos5}" != no; then - if test "${with_kerberos}" = no; then - with_kerberos=yes - $as_echo "#define KERBEROS 1" >>confdefs.h - - fi - -$as_echo "#define KERBEROS5 1" >>confdefs.h - -fi - - -# Check whether --with-hesiod was given. -if test "${with_hesiod+set}" = set; then : - withval=$with_hesiod; -else - with_hesiod=no -fi - -if test "$with_hesiod" != no; then - -$as_echo "#define HESIOD 1" >>confdefs.h - -fi - - -# Check whether --with-mmdf was given. -if test "${with_mmdf+set}" = set; then : - withval=$with_mmdf; -else - with_mmdf=no -fi - -if test "$with_mmdf" != no; then - -$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h - -fi - - -# Check whether --with-mail-unlink was given. -if test "${with_mail_unlink+set}" = set; then : - withval=$with_mail_unlink; -else - with_mail_unlink=no -fi - -if test "$with_mail_unlink" != no; then - -$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h - -fi - - -# Check whether --with-mailhost was given. -if test "${with_mailhost+set}" = set; then : - withval=$with_mailhost; -cat >>confdefs.h <<_ACEOF -#define MAILHOST "$withval" -_ACEOF - -fi - - - -# Check whether --with-sound was given. -if test "${with_sound+set}" = set; then : - withval=$with_sound; -else - with_sound=yes -fi - - - -# Check whether --with-sync-input was given. -if test "${with_sync_input+set}" = set; then : - withval=$with_sync_input; -else - with_sync_input=yes -fi - -if test "$with_sync_input" = yes; then - -$as_echo "#define SYNC_INPUT 1" >>confdefs.h - -fi - - -# Check whether --with-x-toolkit was given. -if test "${with_x_toolkit+set}" = set; then : - withval=$with_x_toolkit; case "${withval}" in - y | ye | yes ) val=gtk ;; - n | no ) val=no ;; - l | lu | luc | luci | lucid ) val=lucid ;; - a | at | ath | athe | athen | athena ) val=athena ;; - m | mo | mot | moti | motif ) val=motif ;; - g | gt | gtk ) val=gtk ;; - gtk3 ) val=gtk3 ;; - * ) -as_fn_error $? "\`--with-x-toolkit=$withval' is invalid; -this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or -\`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 - ;; - esac - with_x_toolkit=$val - -fi - - - -# Check whether --with-xpm was given. -if test "${with_xpm+set}" = set; then : - withval=$with_xpm; -else - with_xpm=yes -fi - - -# Check whether --with-jpeg was given. -if test "${with_jpeg+set}" = set; then : - withval=$with_jpeg; -else - with_jpeg=yes -fi - - -# Check whether --with-tiff was given. -if test "${with_tiff+set}" = set; then : - withval=$with_tiff; -else - with_tiff=yes -fi - - -# Check whether --with-gif was given. -if test "${with_gif+set}" = set; then : - withval=$with_gif; -else - with_gif=yes -fi - - -# Check whether --with-png was given. -if test "${with_png+set}" = set; then : - withval=$with_png; -else - with_png=yes -fi - - -# Check whether --with-rsvg was given. -if test "${with_rsvg+set}" = set; then : - withval=$with_rsvg; -else - with_rsvg=yes -fi - - -# Check whether --with-xml2 was given. -if test "${with_xml2+set}" = set; then : - withval=$with_xml2; -else - with_xml2=yes -fi - - -# Check whether --with-imagemagick was given. -if test "${with_imagemagick+set}" = set; then : - withval=$with_imagemagick; -else - with_imagemagick=yes -fi - - - -# Check whether --with-xft was given. -if test "${with_xft+set}" = set; then : - withval=$with_xft; -else - with_xft=yes -fi - - -# Check whether --with-libotf was given. -if test "${with_libotf+set}" = set; then : - withval=$with_libotf; -else - with_libotf=yes -fi - - -# Check whether --with-m17n-flt was given. -if test "${with_m17n_flt+set}" = set; then : - withval=$with_m17n_flt; -else - with_m17n_flt=yes -fi - - - -# Check whether --with-toolkit-scroll-bars was given. -if test "${with_toolkit_scroll_bars+set}" = set; then : - withval=$with_toolkit_scroll_bars; -else - with_toolkit_scroll_bars=yes -fi - - -# Check whether --with-xaw3d was given. -if test "${with_xaw3d+set}" = set; then : - withval=$with_xaw3d; -else - with_xaw3d=yes -fi - - -# Check whether --with-xim was given. -if test "${with_xim+set}" = set; then : - withval=$with_xim; -else - with_xim=yes -fi - - -# Check whether --with-ns was given. -if test "${with_ns+set}" = set; then : - withval=$with_ns; -else - with_ns=no -fi - - - -# Check whether --with-gpm was given. -if test "${with_gpm+set}" = set; then : - withval=$with_gpm; -else - with_gpm=yes -fi - - -# Check whether --with-dbus was given. -if test "${with_dbus+set}" = set; then : - withval=$with_dbus; -else - with_dbus=yes -fi - - -# Check whether --with-gconf was given. -if test "${with_gconf+set}" = set; then : - withval=$with_gconf; -else - with_gconf=yes -fi - - -# Check whether --with-selinux was given. -if test "${with_selinux+set}" = set; then : - withval=$with_selinux; -else - with_selinux=yes -fi - - -# Check whether --with-gnutls was given. -if test "${with_gnutls+set}" = set; then : - withval=$with_gnutls; -else - with_gnutls=yes -fi - - -## For the times when you want to build Emacs but don't have -## a suitable makeinfo, and can live without the manuals. - -# Check whether --with-makeinfo was given. -if test "${with_makeinfo+set}" = set; then : - withval=$with_makeinfo; -else - with_makeinfo=yes -fi - - -## This is an option because I do not know if all info/man support -## compressed files, nor how to test if they do so. - -# Check whether --with-compress-info was given. -if test "${with_compress_info+set}" = set; then : - withval=$with_compress_info; -else - with_compress_info=yes -fi - -if test $with_compress_info = yes; then - GZIP_INFO=yes -else - GZIP_INFO= -fi - - - -# Check whether --with-pkg-config-prog was given. -if test "${with_pkg_config_prog+set}" = set; then : - withval=$with_pkg_config_prog; -fi - -if test "X${with_pkg_config_prog}" != X; then - if test "${with_pkg_config_prog}" != yes; then - PKG_CONFIG="${with_pkg_config_prog}" - fi -fi - -CRT_DIR= - -# Check whether --with-crt-dir was given. -if test "${with_crt_dir+set}" = set; then : - withval=$with_crt_dir; -fi - -CRT_DIR="${with_crt_dir}" - - -# Check whether --with-gameuser was given. -if test "${with_gameuser+set}" = set; then : - withval=$with_gameuser; -fi - -test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ - && gameuser="${with_gameuser}" -test "X$gameuser" = X && gameuser=games - - -# Check whether --with-gnustep-conf was given. -if test "${with_gnustep_conf+set}" = set; then : - withval=$with_gnustep_conf; -fi - -test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ - GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" -test "X$GNUSTEP_CONFIG_FILE" = "X" && \ - GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf - -# Check whether --enable-ns-self-contained was given. -if test "${enable_ns_self_contained+set}" = set; then : - enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval -else - EN_NS_SELF_CONTAINED=yes -fi - - -# Check whether --enable-asserts was given. -if test "${enable_asserts+set}" = set; then : - enableval=$enable_asserts; USE_XASSERTS=$enableval -else - USE_XASSERTS=no -fi - - -# Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=yes -fi - -if test $USE_MAINTAINER_MODE = yes; then - MAINT= -else - MAINT=# -fi - - -# Check whether --enable-locallisppath was given. -if test "${enable_locallisppath+set}" = set; then : - enableval=$enable_locallisppath; if test "${enableval}" = "no"; then - locallisppath= -elif test "${enableval}" != "yes"; then - locallisppath=${enableval} -fi -fi - - -# Check whether --enable-checking was given. -if test "${enable_checking+set}" = set; then : - enableval=$enable_checking; ac_checking_flags="${enableval}" -fi - -IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," -for check in $ac_checking_flags -do - case $check in - # these set all the flags to specific states - yes) ac_enable_checking=1 ;; - no) ac_enable_checking= ; - ac_gc_check_stringbytes= ; - ac_gc_check_string_overrun= ; - ac_gc_check_string_free_list= ; - ac_xmalloc_overrun= ; - ac_gc_check_cons_list= ;; - all) ac_enable_checking=1 ; - ac_gc_check_stringbytes=1 ; - ac_gc_check_string_overrun=1 ; - ac_gc_check_string_free_list=1 ; - ac_xmalloc_overrun=1 ; - ac_gc_check_cons_list=1 ;; - # these enable particular checks - stringbytes) ac_gc_check_stringbytes=1 ;; - stringoverrun) ac_gc_check_string_overrun=1 ;; - stringfreelist) ac_gc_check_string_free_list=1 ;; - xmallocoverrun) ac_xmalloc_overrun=1 ;; - conslist) ac_gc_check_cons_list=1 ;; - *) as_fn_error $? "unknown check category $check" "$LINENO" 5 ;; - esac -done -IFS="$ac_save_IFS" - -if test x$ac_enable_checking != x ; then - -$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h - -fi -if test x$ac_gc_check_stringbytes != x ; then - -$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h - -fi -if test x$ac_gc_check_stringoverrun != x ; then - -$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h - -fi -if test x$ac_gc_check_string_free_list != x ; then - -$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h - -fi -if test x$ac_xmalloc_overrun != x ; then - -$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h - -fi -if test x$ac_gc_check_cons_list != x ; then - -$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h - -fi - -# Check whether --enable-use-lisp-union-type was given. -if test "${enable_use_lisp_union_type+set}" = set; then : - enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then - -$as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h - -fi -fi - - - -# Check whether --enable-profiling was given. -if test "${enable_profiling+set}" = set; then : - enableval=$enable_profiling; ac_enable_profiling="${enableval}" -fi - -if test x$ac_enable_profiling != x ; then - PROFILING_CFLAGS="-DPROFILING=1 -pg" -else - PROFILING_CFLAGS= -fi - - -# Check whether --enable-autodepend was given. -if test "${enable_autodepend+set}" = set; then : - enableval=$enable_autodepend; ac_enable_autodepend="${enableval}" -else - ac_enable_autodepend=yes -fi - - -#### Make srcdir absolute, if it isn't already. It's important to -#### avoid running the path through pwd unnecessarily, since pwd can -#### give you automounter prefixes, which can go away. We do all this -#### so Emacs can find its files when run uninstalled. -## Make sure CDPATH doesn't affect cd (in case PWD is relative). -unset CDPATH -case "${srcdir}" in - /* ) ;; - . ) - ## We may be able to use the $PWD environment variable to make this - ## absolute. But sometimes PWD is inaccurate. - ## Note: we used to use ${PWD} at the end instead of `pwd`, - ## but that tested only for a well-formed and valid PWD, - ## it did not object when PWD was well-formed and valid but just wrong. - if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ; - then - srcdir="$PWD" - else - srcdir="`(cd ${srcdir}; pwd)`" - fi - ;; - * ) srcdir="`(cd ${srcdir}; pwd)`" ;; -esac - -#### Check if the source directory already has a configured system in it. -if test `pwd` != `(cd ${srcdir} && pwd)` \ - && test -f "${srcdir}/src/config.h" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used - as a build directory right now; it has been configured in its own - right. To configure in another directory as well, you MUST - use GNU make. If you do not have GNU make, then you must - now do \`make distclean' in ${srcdir}, - and then run $0 again." >&5 -$as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used - as a build directory right now; it has been configured in its own - right. To configure in another directory as well, you MUST - use GNU make. If you do not have GNU make, then you must - now do \`make distclean' in ${srcdir}, - and then run $0 again." >&2;} -fi - -#### Given the configuration name, set machfile and opsysfile to the -#### names of the m/*.h and s/*.h files we should use. - -### Canonicalize the configuration name. - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -canonical=$host -configuration=${host_alias-${build_alias-$host}} - - - -### If you add support for a new configuration, add code to this -### switch statement to recognize your configuration name and select -### the appropriate operating system and machine description files. - -### You would hope that you could choose an m/*.h file pretty much -### based on the machine portion of the configuration name, and an s/*.h -### file based on the operating system portion. However, it turns out -### that each m/*.h file is pretty manufacturer-specific - for -### example mips.h is MIPS -### So we basically have to have a special case for each -### configuration name. -### -### As far as handling version numbers on operating systems is -### concerned, make sure things will fail in a fixable way. If -### /etc/MACHINES doesn't say anything about version numbers, be -### prepared to handle anything reasonably. If version numbers -### matter, be sure /etc/MACHINES says something about it. - -machine='' opsys='' unported=no -case "${canonical}" in - - ## GNU/Linux ports - *-*-linux-gnu*) - opsys=gnu-linux - case ${canonical} in - alpha*) machine=alpha ;; - s390-*) machine=ibms390 ;; - s390x-*) machine=ibms390x ;; - powerpc*) machine=macppc ;; - sparc*) machine=sparc ;; - ia64*) machine=ia64 ;; - m68k*) machine=m68k ;; - x86_64*) machine=amdx86-64 ;; - esac - ;; - - ## FreeBSD ports - *-*-freebsd* ) - opsys=freebsd - case "${canonical}" in - alpha*) machine=alpha ;; - amd64-*|x86_64-*) machine=amdx86-64 ;; - ia64-*) machine=ia64 ;; - i[3456]86-*) machine=intel386 ;; - powerpc-*) machine=macppc ;; - sparc-*) machine=sparc ;; - sparc64-*) machine=sparc ;; - esac - ;; - - ## FreeBSD kernel + glibc based userland - *-*-kfreebsd*gnu* ) - opsys=gnu-kfreebsd - case "${canonical}" in - alpha*) machine=alpha ;; - amd64-*|x86_64-*) machine=amdx86-64 ;; - ia64-*) machine=ia64 ;; - i[3456]86-*) machine=intel386 ;; - powerpc-*) machine=macppc ;; - sparc-*) machine=sparc ;; - sparc64-*) machine=sparc ;; - esac - ;; - - ## NetBSD ports - *-*-netbsd* ) - opsys=netbsd - case "${canonical}" in - alpha*) machine=alpha ;; - x86_64-*) machine=amdx86-64 ;; - i[3456]86-*) machine=intel386 ;; - m68k-*) machine=m68k ;; - powerpc-*) machine=macppc ;; - sparc*-) machine=sparc ;; - vax-*) machine=vax ;; - esac - ;; - - ## OpenBSD ports - *-*-openbsd* ) - opsys=openbsd - case "${canonical}" in - alpha*) machine=alpha ;; - x86_64-*) machine=amdx86-64 ;; - i386-*) machine=intel386 ;; - powerpc-*) machine=macppc ;; - sparc*) machine=sparc ;; - vax-*) machine=vax ;; - esac - ;; - - ## Apple Darwin / Mac OS X - *-apple-darwin* ) - case "${canonical}" in - i[3456]86-* ) machine=intel386 ;; - powerpc-* ) machine=macppc ;; - x86_64-* ) machine=amdx86-64 ;; - * ) unported=yes ;; - esac - opsys=darwin - # Define CPP as follows to make autoconf work correctly. - CPP="${CC-cc} -E -no-cpp-precomp" - # Use fink packages if available. - if test -d /sw/include && test -d /sw/lib; then - GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" - CPP="${CPP} ${GCC_TEST_OPTIONS}" - NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} - fi - ;; - - ## HP 9000 series 700 and 800, running HP/UX - hppa*-hp-hpux10.2* ) - opsys=hpux10-20 - ;; - hppa*-hp-hpux1[1-9]* ) - opsys=hpux11 - CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS" - ;; - - ia64*-hp-hpux1[1-9]* ) - machine=hp800 opsys=hpux11 - ## FIXME. Peter O'Gorman reports that dumping using unexelf.o doesn't - ## work either: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6811 - CANNOT_DUMP=yes - ;; - - hppa*-*-linux-gnu* ) - machine=hp800 opsys=gnu-linux - ;; - - ## IBM machines - rs6000-ibm-aix4.[23]* ) - machine=ibmrs6000 opsys=aix4-2 - ;; - powerpc-ibm-aix4.[23]* ) - machine=ibmrs6000 opsys=aix4-2 - ;; - rs6000-ibm-aix[56]* ) - machine=ibmrs6000 opsys=aix4-2 - ;; - powerpc-ibm-aix[56]* ) - machine=ibmrs6000 opsys=aix4-2 - ;; - - ## Silicon Graphics machines - ## Iris 4D - mips-sgi-irix6.5 ) - machine=iris4d opsys=irix6-5 - # Without defining _LANGUAGE_C, things get masked out in the headers - # so that, for instance, grepping for `free' in stdlib.h fails and - # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). - NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" - NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" - ;; - - ## Suns - *-sun-solaris* \ - | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \ - | x86_64-*-solaris2* | x86_64-*-sunos5*) - case "${canonical}" in - i[3456]86-*-* ) machine=intel386 ;; - amd64-*-*|x86_64-*-*) machine=amdx86-64 ;; - sparc* ) machine=sparc ;; - * ) unported=yes ;; - esac - case "${canonical}" in - *-sunos5.6* | *-solaris2.6* ) - opsys=sol2-6 - NON_GNU_CPP=/usr/ccs/lib/cpp - RANLIB="ar -ts" - ;; - *-sunos5.[7-9]* | *-solaris2.[7-9]* ) - opsys=sol2-6 - emacs_check_sunpro_c=yes - NON_GNU_CPP=/usr/ccs/lib/cpp - ;; - *-sunos5* | *-solaris* ) - opsys=sol2-10 - emacs_check_sunpro_c=yes - NON_GNU_CPP=/usr/ccs/lib/cpp - ;; - esac - ## Watch out for a compiler that we know will not work. - case "${canonical}" in - *-solaris* | *-sunos5* ) - if [ "x$CC" = x/usr/ucb/cc ]; then - ## /usr/ucb/cc doesn't work; - ## we should find some other compiler that does work. - unset CC - fi - ;; - *) ;; - esac - ;; - - ## Intel 386 machines where we don't care about the manufacturer. - i[3456]86-*-* ) - machine=intel386 - case "${canonical}" in - *-cygwin ) opsys=cygwin ;; - *-darwin* ) opsys=darwin - CPP="${CC-cc} -E -no-cpp-precomp" - ;; - *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; - *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; - *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; - ## Otherwise, we'll fall through to the generic opsys code at the bottom. - esac - ;; - - * ) - unported=yes - ;; -esac - -### If the code above didn't choose an operating system, just choose -### an operating system based on the configuration name. You really -### only want to use this when you have no idea what the right -### operating system is; if you know what operating systems a machine -### runs, it's cleaner to make it explicit in the case statement -### above. -if test x"${opsys}" = x; then - case "${canonical}" in - *-gnu* ) opsys=gnu ;; - * ) - unported=yes - ;; - esac -fi - - - -if test $unported = yes; then - as_fn_error $? "Emacs hasn't been ported to \`${canonical}' systems. -Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 -fi - -if test -n "$machine"; then - machfile="m/${machine}.h" -else - machfile= -fi -opsysfile="s/${opsys}.h" - - -#### Choose a compiler. -test -n "$CC" && cc_specified=yes - -# Save the value of CFLAGS that the user specified. -SPECIFIED_CFLAGS="$CFLAGS" - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - - - -# Initialize gnulib right after verifying that the C compiler works. -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = xyes; then : - MINIX=yes -else - MINIX= -fi - - - if test "$MINIX" = yes; then - -$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h - - -$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h - - -$as_echo "#define _MINIX 1" >>confdefs.h - - fi - - case "$host_os" in - hpux*) - -$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h - - ;; - esac - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 -$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if ${ac_cv_safe_to_define___extensions__+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# define __EXTENSIONS__ 1 - $ac_includes_default -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_safe_to_define___extensions__=yes -else - ac_cv_safe_to_define___extensions__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && - $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h - - $as_echo "#define _ALL_SOURCE 1" >>confdefs.h - - $as_echo "#define _GNU_SOURCE 1" >>confdefs.h - - $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - - $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h - - - - - - - - - - - # Code from module arg-nonnull: - # Code from module c++defs: - # Code from module crypto/md5: - # Code from module dosname: - # Code from module dtoastr: - # Code from module extensions: - - # Code from module filemode: - # Code from module getloadavg: - # Code from module getopt-gnu: - # Code from module getopt-posix: - # Code from module gettext-h: - # Code from module ignore-value: - # Code from module include_next: - # Code from module intprops: - # Code from module lstat: - # Code from module mktime: - # Code from module multiarch: - # Code from module readlink: - # Code from module socklen: - # Code from module stat: - # Code from module stdbool: - # Code from module stddef: - # Code from module stdint: - # Code from module stdio: - # Code from module stdlib: - # Code from module strftime: - # Code from module symlink: - # Code from module sys_stat: - # Code from module time: - # Code from module time_r: - # Code from module unistd: - # Code from module warn-on-use: - - -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi - -## If not using gcc, and on Solaris, and no CPP specified, see if -## using a Sun compiler, which needs -Xs to prevent whitespace. -if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ - test x"$CPP" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5 -$as_echo_n "checking whether we are using a Sun C compiler... " >&6; } - if ${emacs_cv_sunpro_c+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __SUNPRO_C -fail; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_sunpro_c=yes -else - emacs_cv_sunpro_c=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5 -$as_echo "$emacs_cv_sunpro_c" >&6; } - - if test x"$emacs_cv_sunpro_c" = xyes; then - NON_GNU_CPP="$CC -E -Xs" - fi -fi - -#### Some systems specify a CPP to use unless we are using GCC. -#### Now that we know whether we are using GCC, we can decide whether -#### to use that one. -if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x -then - CPP="$NON_GNU_CPP" -fi - -#### Some systems specify a CC to use unless we are using GCC. -#### Now that we know whether we are using GCC, we can decide whether -#### to use that one. -if test "x$NON_GNU_CC" != x && test x$GCC != xyes && - test x$cc_specified != xyes -then - CC="$NON_GNU_CC" -fi - -if test x$GCC = xyes; then - test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" -else - test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" -fi - -### Use -Wdeclaration-after-statement if the compiler supports it -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5 -$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; } -SAVE_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wdeclaration-after-statement" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - has_option=yes -else - has_option=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test $has_option = yes; then - C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 -$as_echo "$has_option" >&6; } -CFLAGS="$SAVE_CFLAGS" -unset has_option -unset SAVE_CFLAGS - -### Use -Wold-style-definition if the compiler supports it -# This can be removed when conversion to standard C is finished. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5 -$as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; } -SAVE_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wold-style-definition" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - has_option=yes -else - has_option=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test $has_option = yes; then - C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 -$as_echo "$has_option" >&6; } -CFLAGS="$SAVE_CFLAGS" -unset has_option -unset SAVE_CFLAGS - -### Use -Wimplicit-function-declaration if the compiler supports it -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5 -$as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; } -SAVE_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wimplicit-function-declaration" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - has_option=yes -else - has_option=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test $has_option = yes; then - C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 -$as_echo "$has_option" >&6; } -CFLAGS="$SAVE_CFLAGS" -unset has_option -unset SAVE_CFLAGS - - - - -#### Some other nice autoconf tests. - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -if test "x$RANLIB" = x; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -fi - -## Although we're running on an amd64 kernel, we're actually compiling for -## the x86 architecture. The user should probably have provided an -## explicit --build to `configure', but if everything else than the kernel -## is running in i386 mode, we can help them out. -if test "$machine" = "amdx86-64"; then - ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default" -if test "x$ac_cv_have_decl_i386" = xyes; then : - -fi - - if test "$ac_cv_have_decl_i386" = "yes"; then - canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'` - machine=intel386 - machfile="m/${machine}.h" - fi -fi - -# Extract the first word of "install-info", so it can be a program name with args. -set dummy install-info; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_INSTALL_INFO+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $INSTALL_INFO in - [\\/]* | ?:[\\/]*) - ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -INSTALL_INFO=$ac_cv_path_INSTALL_INFO -if test -n "$INSTALL_INFO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 -$as_echo "$INSTALL_INFO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "install-info", so it can be a program name with args. -set dummy install-info; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_INSTALL_INFO+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $INSTALL_INFO in - [\\/]* | ?:[\\/]*) - ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /usr/sbin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -INSTALL_INFO=$ac_cv_path_INSTALL_INFO -if test -n "$INSTALL_INFO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 -$as_echo "$INSTALL_INFO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "install-info", so it can be a program name with args. -set dummy install-info; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_INSTALL_INFO+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $INSTALL_INFO in - [\\/]* | ?:[\\/]*) - ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /sbin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" - ;; -esac -fi -INSTALL_INFO=$ac_cv_path_INSTALL_INFO -if test -n "$INSTALL_INFO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 -$as_echo "$INSTALL_INFO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "gzip", so it can be a program name with args. -set dummy gzip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GZIP_PROG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $GZIP_PROG in - [\\/]* | ?:[\\/]*) - ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -GZIP_PROG=$ac_cv_path_GZIP_PROG -if test -n "$GZIP_PROG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5 -$as_echo "$GZIP_PROG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -## Need makeinfo >= 4.6 (?) to build the manuals. -# Extract the first word of "makeinfo", so it can be a program name with args. -set dummy makeinfo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MAKEINFO+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAKEINFO in - [\\/]* | ?:[\\/]*) - ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no" - ;; -esac -fi -MAKEINFO=$ac_cv_path_MAKEINFO -if test -n "$MAKEINFO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 -$as_echo "$MAKEINFO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test "$MAKEINFO" != "no" && \ - test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[6-9]|4\.[1-5][0-9]+)'`" = x; then - MAKEINFO=no -fi - -## Makeinfo is unusual. For a released Emacs, the manuals are -## pre-built, and not deleted by the normal clean rules. makeinfo is -## therefore in the category of "special tools" not normally required, which -## configure does not have to check for (eg autoconf itself). -## In a Bazaar checkout on the other hand, the manuals are not included. -## So makeinfo is a requirement to build from Bazaar, and configure -## should test for it as it does for any other build requirement. -## We use the presence of $srcdir/info/emacs to distinguish a release, -## with pre-built manuals, from a Bazaar checkout. -HAVE_MAKEINFO=yes - -if test "$MAKEINFO" = "no"; then - MAKEINFO=makeinfo - if test "x${with_makeinfo}" = "xno"; then - HAVE_MAKEINFO=no - elif test ! -e $srcdir/info/emacs; then - as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your -source tree does not seem to have pre-built manuals in the \`info' directory. -Either install a suitable version of makeinfo, or re-run configure -with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 - fi -fi - - - -if test x$GCC = xyes; then - test "x$GCC_LINK_TEST_OPTIONS" != x && \ - ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" -else - test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \ - ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" -fi - - -late_LDFLAGS=$LDFLAGS -if test x$GCC = xyes; then - LDFLAGS="$LDFLAGS -Wl,-znocombreloc" -else - LDFLAGS="$LDFLAGS -znocombreloc" -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 -$as_echo_n "checking for -znocombreloc... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - LDFLAGS=$late_LDFLAGS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -# The value of CPP is a quoted variable reference, so we need to do this -# to get its actual value... -CPP=`eval "echo $CPP"` - - -test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no -case "$opsys" in - your-opsys-here) CANNOT_DUMP=yes ;; -esac - -test "$CANNOT_DUMP" = "yes" && \ - -$as_echo "#define CANNOT_DUMP 1" >>confdefs.h - - - - - -UNEXEC_OBJ=unexelf.o -case "$opsys" in - # MSDOS uses unexcoff.o - # MSWindows uses unexw32.o - aix4-2) - UNEXEC_OBJ=unexaix.o - ;; - cygwin) - UNEXEC_OBJ=unexcw.o - ;; - darwin) - UNEXEC_OBJ=unexmacosx.o - ;; - hpux10-20 | hpux11) - UNEXEC_OBJ=unexhp9k800.o - ;; - sol2-10) - # Use the Solaris dldump() function, called from unexsol.c, to dump - # emacs, instead of the generic ELF dump code found in unexelf.c. - # The resulting binary has a complete symbol table, and is better - # for debugging and other observability tools (debuggers, pstack, etc). - # - # If you encounter a problem using dldump(), please consider sending - # a message to the OpenSolaris tools-linking mailing list: - # http://mail.opensolaris.org/mailman/listinfo/tools-linking - # - # It is likely that dldump() works with older Solaris too, but this has - # not been tested, so for now this change is for Solaris 10 or newer. - UNEXEC_OBJ=unexsol.o - ;; -esac - -LD_SWITCH_SYSTEM= -case "$opsys" in - freebsd) - ## Let `ld' find image libs and similar things in /usr/local/lib. - ## The system compiler, GCC, has apparently been modified to not - ## look there, contrary to what a stock GCC would do. - LD_SWITCH_SYSTEM=-L/usr/local/lib - ;; - - gnu-linux) - ## cpp test was "ifdef __mips__", but presumably this is equivalent... - case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac - ;; - - netbsd) - LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib" - ;; - - openbsd) - ## Han Boetes says this is necessary, - ## otherwise Emacs dumps core on elf systems. - LD_SWITCH_SYSTEM="-Z" - ;; -esac - - -ac_link="$ac_link $LD_SWITCH_SYSTEM" - -## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX, -## which has not been defined yet. When this was handled with cpp, -## it was expanded to null when configure sourced the s/*.h file. -## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. -## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS -## (or somesuch), but because it is supposed to go at the _front_ -## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way. -## Compare with the gnu-linux case below, which added to the end -## of LD_SWITCH_SYSTEM, and so can instead go at the front of -## LD_SWITCH_SYSTEM_TEMACS. -case "$opsys" in - netbsd|openbsd) - ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R. - LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;; -esac - - -C_SWITCH_MACHINE= -if test "$machine" = "alpha"; then - ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" -if test "x$ac_cv_have_decl___ELF__" = xyes; then : - -fi - - if test "$ac_cv_have_decl___ELF__" = "yes"; then - ## With ELF, make sure that all common symbols get allocated to in the - ## data section. Otherwise, the dump of temacs may miss variables in - ## the shared library that have been initialized. For example, with - ## GNU libc, __malloc_initialized would normally be resolved to the - ## shared library's .bss section, which is fatal. - if test "x$GCC" = "xyes"; then - C_SWITCH_MACHINE="-fno-common" - else - as_fn_error $? "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 - fi - else - UNEXEC_OBJ=unexalpha.o - fi -fi - - - - -C_SWITCH_SYSTEM= -## Some programs in src produce warnings saying certain subprograms -## are too complex and need a MAXMEM value greater than 2000 for -## additional optimization. --nils@exp-math.uni-essen.de -test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \ - C_SWITCH_SYSTEM="-ma -qmaxmem=4000" -## gnu-linux might need -D_BSD_SOURCE on old libc5 systems. -## It is redundant in glibc2, since we define _GNU_SOURCE. - - - -LIBS_SYSTEM= -case "$opsys" in - ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. - aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; - - freebsd) LIBS_SYSTEM="-lutil" ;; - - hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; - - sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;; - - ## Motif needs -lgen. - unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;; -esac - - - -### Make sure subsequent tests use flags consistent with the build flags. - -if test x"${OVERRIDE_CPPFLAGS}" != x; then - CPPFLAGS="${OVERRIDE_CPPFLAGS}" -else - CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" -fi - -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; -fi - -if test "$enable_largefile" != no; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if ${ac_cv_sys_largefile_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF - if ac_fn_c_try_compile "$LINENO"; then : - break -fi -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_largefile_CC=' -n32'; break -fi -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if ${ac_cv_sys_file_offset_bits+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF -;; -esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if ${ac_cv_sys_large_files+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF -;; -esac -rm -rf conftest* - fi -fi - - - -## If user specified a crt-dir, use that unconditionally. -if test "X$CRT_DIR" = "X"; then - - case "$canonical" in - x86_64-*-linux-gnu* | s390x-*-linux-gnu*) - ## On x86-64 and s390x GNU/Linux distributions, the standard library - ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. - ## For anything else (eg /usr/lib32), it is up the user to specify - ## the location (bug#5655). - ## Test for crtn.o, not just the directory, because sometimes the - ## directory exists but does not have the relevant files (bug#1287). - ## FIXME better to test for binary compatibility somehow. - test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 - ;; - - powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; - esac - - case "$opsys" in - hpux10-20) CRT_DIR=/lib ;; - esac - - ## Default is /usr/lib. - test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib - -else - - ## Some platforms don't use any of these files, so it is not - ## appropriate to put this test outside the if block. - test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ - as_fn_error $? "crt*.o not found in specified location." "$LINENO" 5 - -fi - - - -LIB_MATH=-lm -LIB_STANDARD= -START_FILES= - -case $opsys in - cygwin ) - LIB_MATH= - START_FILES='pre-crt0.o' - ;; - darwin ) - ## Adding -lm confuses the dynamic linker, so omit it. - LIB_MATH= - START_FILES='pre-crt0.o' - ;; - freebsd ) - LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' - START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' - ;; - gnu-linux | gnu-kfreebsd ) - LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' - START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o' - ;; - hpux10-20 | hpux11 ) - LIB_STANDARD=-lc - START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o' - ;; - netbsd | openbsd ) - if test -f $CRT_DIR/crti.o; then - LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' - START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' - else - LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o' - START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o' - fi - ;; -esac - - - - - - - -if test "${with_sound}" != "no"; then - # Sound support for GNU/Linux and the free BSDs. - for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - have_sound_header=yes -fi - -done - - # Emulation library used on NetBSD. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 -$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } -if ${ac_cv_lib_ossaudio__oss_ioctl+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lossaudio $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _oss_ioctl (); -int -main () -{ -return _oss_ioctl (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ossaudio__oss_ioctl=yes -else - ac_cv_lib_ossaudio__oss_ioctl=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 -$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } -if test "x$ac_cv_lib_ossaudio__oss_ioctl" = xyes; then : - LIBSOUND=-lossaudio -else - LIBSOUND= -fi - - - - ALSA_REQUIRED=1.0.0 - ALSA_MODULES="alsa >= $ALSA_REQUIRED" - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - HAVE_ALSA=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5 -$as_echo_n "checking for $ALSA_MODULES... " >&6; } - - if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5 -$as_echo_n "checking ALSA_CFLAGS... " >&6; } - ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5 -$as_echo "$ALSA_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5 -$as_echo_n "checking ALSA_LIBS... " >&6; } - ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5 -$as_echo "$ALSA_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ALSA_CFLAGS="" - ALSA_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_ALSA=yes - else - HAVE_ALSA=no - fi - - if test $HAVE_ALSA = yes; then - SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" - CFLAGS="$ALSA_CFLAGS $CFLAGS" - LDFLAGS="$ALSA_LIBS $LDFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -snd_lib_error_set_handler (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_alsa_normal=yes -else - emacs_alsa_normal=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$emacs_alsa_normal" != yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -snd_lib_error_set_handler (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_alsa_subdir=yes -else - emacs_alsa_subdir=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$emacs_alsa_subdir" != yes; then - as_fn_error $? "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 - fi - ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" - fi - - CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" - LIBSOUND="$LIBSOUND $ALSA_LIBS" - CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" - -$as_echo "#define HAVE_ALSA 1" >>confdefs.h - - fi - - if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then - case "$opsys" in - gnu-linux|freebsd|netbsd) - -$as_echo "#define HAVE_SOUND 1" >>confdefs.h - - ;; - esac - fi - - -fi - -for ac_header in sys/select.h sys/time.h unistd.h utime.h \ - linux/version.h sys/systeminfo.h limits.h \ - stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \ - sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ - sys/utsname.h pwd.h utmp.h dirent.h util.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 -$as_echo_n "checking if personality LINUX32 can be set... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -personality (PER_LINUX32) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_personality_linux32=yes -else - emacs_cv_personality_linux32=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5 -$as_echo "$emacs_cv_personality_linux32" >&6; } - -if test $emacs_cv_personality_linux32 = yes; then - -$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h - -fi - -for ac_header in term.h -do : - ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" -if test "x$ac_cv_header_term_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TERM_H 1 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - -ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" -if test "x$ac_cv_have_decl_sys_siglist" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SYS_SIGLIST $ac_have_decl -_ACEOF - -if test $ac_cv_have_decl_sys_siglist != yes; then - # For Tru64, at least: - ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" -if test "x$ac_cv_have_decl___sys_siglist" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL___SYS_SIGLIST $ac_have_decl -_ACEOF - - if test $ac_cv_have_decl___sys_siglist = yes; then - -$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 -$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if ${ac_cv_header_sys_wait_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) -#endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif - -int -main () -{ - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_sys_wait_h=yes -else - ac_cv_header_sys_wait_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 -$as_echo "$ac_cv_header_sys_wait_h" >&6; } -if test $ac_cv_header_sys_wait_h = yes; then - -$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 -$as_echo_n "checking for struct utimbuf... " >&6; } -if ${emacs_cv_struct_utimbuf+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef TIME_WITH_SYS_TIME -#include -#include -#else -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif -#ifdef HAVE_UTIME_H -#include -#endif -int -main () -{ -static struct utimbuf x; x.actime = x.modtime; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_struct_utimbuf=yes -else - emacs_cv_struct_utimbuf=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5 -$as_echo "$emacs_cv_struct_utimbuf" >&6; } -if test $emacs_cv_struct_utimbuf = yes; then - -$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if ${ac_cv_type_signal+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } - -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 -$as_echo_n "checking for speed_t... " >&6; } -if ${emacs_cv_speed_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -speed_t x = 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_speed_t=yes -else - emacs_cv_speed_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5 -$as_echo "$emacs_cv_speed_t" >&6; } -if test $emacs_cv_speed_t = yes; then - -$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 -$as_echo_n "checking for struct timeval... " >&6; } -if ${emacs_cv_struct_timeval+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef TIME_WITH_SYS_TIME -#include -#include -#else -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif -int -main () -{ -static struct timeval x; x.tv_sec = x.tv_usec; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_struct_timeval=yes -else - emacs_cv_struct_timeval=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5 -$as_echo "$emacs_cv_struct_timeval" >&6; } -HAVE_TIMEVAL=$emacs_cv_struct_timeval -if test $emacs_cv_struct_timeval = yes; then - -$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 -$as_echo_n "checking for struct exception... " >&6; } -if ${emacs_cv_struct_exception+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_struct_exception=yes -else - emacs_cv_struct_exception=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5 -$as_echo "$emacs_cv_struct_exception" >&6; } -HAVE_EXCEPTION=$emacs_cv_struct_exception -if test $emacs_cv_struct_exception != yes; then - -$as_echo "#define NO_MATHERR 1" >>confdefs.h - -fi - -for ac_header in net/if.h -do : - ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -" -if test "x$ac_cv_header_net_if_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NET_IF_H 1 -_ACEOF - -fi - -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if ${ac_cv_struct_tm+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -struct tm tm; - int *p = &tm.tm_sec; - return !p; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_tm=time.h -else - ac_cv_struct_tm=sys/time.h -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -$as_echo "$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h - -fi - -ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include -#include <$ac_cv_struct_tm> - -" -if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TM_TM_ZONE 1 -_ACEOF - - -fi - -if test "$ac_cv_member_struct_tm_tm_zone" = yes; then - -$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h - -else - ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include -" -if test "x$ac_cv_have_decl_tzname" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME $ac_have_decl -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 -$as_echo_n "checking for tzname... " >&6; } -if ${ac_cv_var_tzname+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if !HAVE_DECL_TZNAME -extern char *tzname[]; -#endif - -int -main () -{ -return tzname[0][0]; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_tzname=yes -else - ac_cv_var_tzname=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 -$as_echo "$ac_cv_var_tzname" >&6; } - if test $ac_cv_var_tzname = yes; then - -$as_echo "#define HAVE_TZNAME 1" >>confdefs.h - - fi -fi - -ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include -" -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : - -$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h - -fi - -ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -" -if test "x$ac_cv_member_struct_ifreq_ifr_flags" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -" -if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -" -if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -" -if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -" -if test "x$ac_cv_member_struct_ifreq_ifr_addr" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFREQ_IFR_ADDR 1 -_ACEOF - - -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 -$as_echo_n "checking for function prototypes... " >&6; } -if test "$ac_cv_prog_cc_c89" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define PROTOTYPES 1" >>confdefs.h - - -$as_echo "#define __PROTOTYPES 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 -$as_echo_n "checking for working volatile... " >&6; } -if ${ac_cv_c_volatile+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -volatile int x; -int * volatile y = (int *) 0; -return !x && !y; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_volatile=yes -else - ac_cv_c_volatile=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 -$as_echo "$ac_cv_c_volatile" >&6; } -if test $ac_cv_c_volatile = no; then - -$as_echo "#define volatile /**/" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5 -$as_echo_n "checking for void * support... " >&6; } -if ${emacs_cv_void_star+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -void * foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_void_star=yes -else - emacs_cv_void_star=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5 -$as_echo "$emacs_cv_void_star" >&6; } -if test $emacs_cv_void_star = yes; then - $as_echo "#define POINTER_TYPE void" >>confdefs.h - -else - $as_echo "#define POINTER_TYPE char" >>confdefs.h - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5 -$as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; } -if ${emacs_cv_attribute_aligned+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -char __attribute__ ((__aligned__ (1 << 3))) c; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_attribute_aligned=yes -else - emacs_cv_attribute_aligned=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5 -$as_echo "$emacs_cv_attribute_aligned" >&6; } -if test $emacs_cv_attribute_aligned = yes; then - -$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - - -DEPFLAGS= -MKDEPDIR=":" -deps_frag=deps.mk -if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 -$as_echo_n "checking whether we are using GNU Make... " >&6; } - HAVE_GNU_MAKE=no - testval=`make --version 2>/dev/null | grep 'GNU Make'` - if test "x$testval" != x; then - HAVE_GNU_MAKE=yes - else - ac_enable_autodepend=no - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5 -$as_echo "$HAVE_GNU_MAKE" >&6; } - if test $HAVE_GNU_MAKE = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5 -$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; } - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -MMD -MF deps.d" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_enable_autodepend=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$SAVE_CFLAGS" - test -f deps.d || ac_enable_autodepend=no - rm -rf deps.d - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5 -$as_echo "$ac_enable_autodepend" >&6; } - fi - if test $ac_enable_autodepend = yes; then - DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' - ## In parallel builds, another make might create depdir between - ## the first test and mkdir, so stick another test on the end. - ## Or use mkinstalldirs? mkdir -p is not portable. - MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' - deps_frag=autodeps.mk - fi -fi -deps_frag=$srcdir/src/$deps_frag - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 -$as_echo_n "checking for long file names... " >&6; } -if ${ac_cv_sys_long_file_names+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_sys_long_file_names=yes -# Test for long file names in all the places we know might matter: -# . the current directory, where building will happen -# $prefix/lib where we will be installing things -# $exec_prefix/lib likewise -# $TMPDIR if set, where it might want to write temporary files -# /tmp where it might want to write temporary files -# /var/tmp likewise -# /usr/tmp likewise -for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do - # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib - # in the usual case where exec_prefix is '${prefix}'. - case $ac_dir in #( - . | /* | ?:[\\/]*) ;; #( - *) continue;; - esac - test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. - ac_xdir=$ac_dir/cf$$ - (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue - ac_tf1=$ac_xdir/conftest9012345 - ac_tf2=$ac_xdir/conftest9012346 - touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || - ac_cv_sys_long_file_names=no - rm -f -r "$ac_xdir" 2>/dev/null - test $ac_cv_sys_long_file_names = no && break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 -$as_echo "$ac_cv_sys_long_file_names" >&6; } -if test $ac_cv_sys_long_file_names = yes; then - -$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h - -fi - - -#### Choose a window system. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 -$as_echo_n "checking for X... " >&6; } - - -# Check whether --with-x was given. -if test "${with_x+set}" = set; then : - withval=$with_x; -fi - -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( - *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : - $as_echo_n "(cached) " >&6 -else - # One or both of the vars are not set, and there is no cached value. -ac_x_includes=no ac_x_libraries=no -rm -f -r conftest.dir -if mkdir conftest.dir; then - cd conftest.dir - cat >Imakefile <<'_ACEOF' -incroot: - @echo incroot='${INCROOT}' -usrlibdir: - @echo usrlibdir='${USRLIBDIR}' -libdir: - @echo libdir='${LIBDIR}' -_ACEOF - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. - for ac_var in incroot usrlibdir libdir; do - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" - done - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl dylib la dll; do - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && - test -f "$ac_im_libdir/libX11.$ac_extension"; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case $ac_im_incroot in - /usr/include) ac_x_includes= ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; - esac - case $ac_im_usrlibdir in - /usr/lib | /usr/lib64 | /lib | /lib64) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; - esac - fi - cd .. - rm -f -r conftest.dir -fi - -# Standard set of common directories for X headers. -# Check X11 before X11Rn because it is often a symlink to the current release. -ac_x_header_dirs=' -/usr/X11/include -/usr/X11R7/include -/usr/X11R6/include -/usr/X11R5/include -/usr/X11R4/include - -/usr/include/X11 -/usr/include/X11R7 -/usr/include/X11R6 -/usr/include/X11R5 -/usr/include/X11R4 - -/usr/local/X11/include -/usr/local/X11R7/include -/usr/local/X11R6/include -/usr/local/X11R5/include -/usr/local/X11R4/include - -/usr/local/include/X11 -/usr/local/include/X11R7 -/usr/local/include/X11R6 -/usr/local/include/X11R5 -/usr/local/include/X11R4 - -/usr/X386/include -/usr/x386/include -/usr/XFree86/include/X11 - -/usr/include -/usr/local/include -/usr/unsupported/include -/usr/athena/include -/usr/local/x11r5/include -/usr/lpp/Xamples/include - -/usr/openwin/include -/usr/openwin/share/include' - -if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. - # First, try using that file with no special directory specified. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # We can compile using X headers with no special include directory. -ac_x_includes= -else - for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then - ac_x_includes=$ac_dir - break - fi -done -fi -rm -f conftest.err conftest.i conftest.$ac_ext -fi # $ac_x_includes = no - -if test "$ac_x_libraries" = no; then - # Check for the libraries. - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -XrmInitialize () - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - LIBS=$ac_save_LIBS -# We can link X programs with no special library path. -ac_x_libraries= -else - LIBS=$ac_save_LIBS -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` -do - # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl dylib la dll; do - if test -r "$ac_dir/libX11.$ac_extension"; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi # $ac_x_libraries = no - -case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) - # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$ac_x_includes'\ - ac_x_libraries='$ac_x_libraries'" -esac -fi -;; #( - *) have_x=yes;; - esac - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 -$as_echo "$have_x" >&6; } - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$x_includes'\ - ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } -fi - -if test "$no_x" = yes; then - window_system=none -else - window_system=x11 -fi - -## Workaround for bug in autoconf <= 2.62. -## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html -## No need to do anything special for these standard directories. -if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then - - x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` - -fi - -LD_SWITCH_X_SITE_AUX= -LD_SWITCH_X_SITE_AUX_RPATH= -if test "${x_libraries}" != NONE; then - if test -n "${x_libraries}"; then - LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` - LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` - LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'` - fi - x_default_search_path="" - x_search_path=${x_libraries} - if test -z "${x_search_path}"; then - x_search_path=/usr/lib - fi - for x_library in `echo ${x_search_path}: | \ - sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do - x_search_path="\ -${x_library}/X11/%L/%T/%N%C%S:\ -${x_library}/X11/%l/%T/%N%C%S:\ -${x_library}/X11/%T/%N%C%S:\ -${x_library}/X11/%L/%T/%N%S:\ -${x_library}/X11/%l/%T/%N%S:\ -${x_library}/X11/%T/%N%S" - if test x"${x_default_search_path}" = x; then - x_default_search_path=${x_search_path} - else - x_default_search_path="${x_search_path}:${x_default_search_path}" - fi - done -fi - - - -if test "${x_includes}" != NONE && test -n "${x_includes}"; then - C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` -fi - -if test x"${x_includes}" = x; then - bitmapdir=/usr/include/X11/bitmaps -else - # accumulate include directories that have X11 bitmap subdirectories - bmd_acc="dummyval" - for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do - if test -d "${bmd}/X11/bitmaps"; then - bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" - fi - if test -d "${bmd}/bitmaps"; then - bmd_acc="${bmd_acc}:${bmd}/bitmaps" - fi - done - if test ${bmd_acc} != "dummyval"; then - bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` - fi -fi - -HAVE_NS=no -NS_IMPL_COCOA=no -NS_IMPL_GNUSTEP=no -tmp_CPPFLAGS="$CPPFLAGS" -tmp_CFLAGS="$CFLAGS" -CPPFLAGS="$CPPFLAGS -x objective-c" -CFLAGS="$CFLAGS -x objective-c" -TEMACS_LDFLAGS2="\${LDFLAGS}" -if test "${with_ns}" != no; then - if test "${opsys}" = darwin; then - NS_IMPL_COCOA=yes - ns_appdir=`pwd`/nextstep/Emacs.app - ns_appbindir=${ns_appdir}/Contents/MacOS/ - ns_appresdir=${ns_appdir}/Contents/Resources - ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base - elif test -f $GNUSTEP_CONFIG_FILE; then - NS_IMPL_GNUSTEP=yes - ns_appdir=`pwd`/nextstep/Emacs.app - ns_appbindir=${ns_appdir}/ - ns_appresdir=${ns_appdir}/Resources - ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base - GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" - GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" - GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" - GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" - test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ - GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" - test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ - GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" - CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" - CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" - LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" - LIB_STANDARD= - START_FILES= - TEMACS_LDFLAGS2= - fi - ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" -if test "x$ac_cv_header_AppKit_AppKit_h" = xyes; then : - HAVE_NS=yes -else - as_fn_error $? "\`--with-ns' was specified, but the include - files are missing or cannot be compiled." "$LINENO" 5 -fi - - - NS_HAVE_NSINTEGER=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -NSInteger i; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ns_have_nsinteger=yes -else - ns_have_nsinteger=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ns_have_nsinteger = no; then - NS_HAVE_NSINTEGER=no - fi -fi - - -ns_frag=/dev/null -NS_OBJ= -NS_OBJC_OBJ= -NS_SUPPORT= -if test "${HAVE_NS}" = yes; then - window_system=nextstep - with_xft=no - # set up packaging dirs - exec_prefix=${ns_appbindir} - libexecdir=${ns_appbindir}/libexec - if test "${EN_NS_SELF_CONTAINED}" = yes; then - prefix=${ns_appresdir} - fi - ns_frag=$srcdir/src/ns.mk - NS_OBJ="fontset.o fringe.o image.o" - NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" - NS_SUPPORT="\${lispsource}/emacs-lisp/easymenu.elc \${lispsource}/term/ns-win.elc" -fi -CFLAGS="$tmp_CFLAGS" -CPPFLAGS="$tmp_CPPFLAGS" - - - - - - -case "${window_system}" in - x11 ) - HAVE_X_WINDOWS=yes - HAVE_X11=yes - case "${with_x_toolkit}" in - athena | lucid ) USE_X_TOOLKIT=LUCID ;; - motif ) USE_X_TOOLKIT=MOTIF ;; - gtk ) with_gtk=yes - USE_X_TOOLKIT=none ;; - gtk3 ) with_gtk3=yes - USE_X_TOOLKIT=none ;; - no ) USE_X_TOOLKIT=none ;; - * ) USE_X_TOOLKIT=maybe ;; - esac - ;; - nextstep | none ) - HAVE_X_WINDOWS=no - HAVE_X11=no - USE_X_TOOLKIT=none - ;; -esac - -if test "$window_system" = none && test "X$with_x" != "Xno"; then - # Extract the first word of "X", so it can be a program name with args. -set dummy X; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_XSERVER+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$HAVE_XSERVER"; then - ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_HAVE_XSERVER="true" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false" -fi -fi -HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER -if test -n "$HAVE_XSERVER"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5 -$as_echo "$HAVE_XSERVER" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$HAVE_XSERVER" = true || - test -n "$DISPLAY" || - test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then - as_fn_error $? "You seem to be running X, but no X development libraries -were found. You should install the relevant development files for X -and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make -sure you have development files for image handling, i.e. -tiff, gif, jpeg, png and xpm. -If you are sure you want Emacs compiled without X window support, pass - --without-x -to configure." "$LINENO" 5 - fi -fi - -### If we're using X11, we should use the X menu package. -HAVE_MENUS=no -case ${HAVE_X11} in - yes ) HAVE_MENUS=yes ;; -esac - -# Do the opsystem or machine files prohibit the use of the GNU malloc? -# Assume not, until told otherwise. -GNU_MALLOC=yes -doug_lea_malloc=yes -ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state" -if test "x$ac_cv_func_malloc_get_state" = xyes; then : - -else - doug_lea_malloc=no -fi - -ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state" -if test "x$ac_cv_func_malloc_set_state" = xyes; then : - -else - doug_lea_malloc=no -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5 -$as_echo_n "checking whether __after_morecore_hook exists... " >&6; } -if ${emacs_cv_var___after_morecore_hook+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern void (* __after_morecore_hook)(); -int -main () -{ -__after_morecore_hook = 0 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_var___after_morecore_hook=yes -else - emacs_cv_var___after_morecore_hook=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5 -$as_echo "$emacs_cv_var___after_morecore_hook" >&6; } -if test $emacs_cv_var___after_morecore_hook = no; then - doug_lea_malloc=no -fi - - -system_malloc=no -case "$opsys" in - ## darwin ld insists on the use of malloc routines in the System framework. - darwin|sol2-10) system_malloc=yes ;; -esac - -if test "${system_malloc}" = "yes"; then - -$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h - - GNU_MALLOC=no - GNU_MALLOC_reason=" - (The GNU allocators don't work with this system configuration.)" - GMALLOC_OBJ= - VMLIMIT_OBJ= -else - test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o - VMLIMIT_OBJ=vm-limit.o -fi - - - -if test "$doug_lea_malloc" = "yes" ; then - if test "$GNU_MALLOC" = yes ; then - GNU_MALLOC_reason=" - (Using Doug Lea's new malloc from the GNU C Library.)" - fi - -$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h - - - ## Use mmap directly for allocating larger buffers. - ## FIXME this comes from src/s/{gnu,gnu-linux}.h: - ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif - ## Does the AC_FUNC_MMAP test below make this check unecessary? - case "$opsys" in - gnu*) REL_ALLOC=no ;; - esac -fi - -if test x"${REL_ALLOC}" = x; then - REL_ALLOC=${GNU_MALLOC} -fi - -use_mmap_for_buffers=no -case "$opsys" in - freebsd|irix6-5) use_mmap_for_buffers=yes ;; -esac - - - - - for ac_header in $ac_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - - - -for ac_func in getpagesize -do : - ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPAGESIZE 1 -_ACEOF - -fi -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 -$as_echo_n "checking for working mmap... " >&6; } -if ${ac_cv_func_mmap_fixed_mapped+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_mmap_fixed_mapped=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -/* malloc might have been renamed as rpl_malloc. */ -#undef malloc - -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ - -#include -#include - -#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H -char *malloc (); -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -int -main () -{ - char *data, *data2, *data3; - const char *cdata2; - int i, pagesize; - int fd, fd2; - - pagesize = getpagesize (); - - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - return 1; - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - return 2; - if (write (fd, data, pagesize) != pagesize) - return 3; - close (fd); - - /* Next, check that the tail of a page is zero-filled. File must have - non-zero length, otherwise we risk SIGBUS for entire page. */ - fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); - if (fd2 < 0) - return 4; - cdata2 = ""; - if (write (fd2, cdata2, 1) != 1) - return 5; - data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); - if (data2 == MAP_FAILED) - return 6; - for (i = 0; i < pagesize; ++i) - if (*(data2 + i)) - return 7; - close (fd2); - if (munmap (data2, pagesize)) - return 8; - - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - return 9; - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 10; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - return 11; - - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - return 12; - if (read (fd, data3, pagesize) != pagesize) - return 13; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - return 14; - close (fd); - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_mmap_fixed_mapped=yes -else - ac_cv_func_mmap_fixed_mapped=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 -$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } -if test $ac_cv_func_mmap_fixed_mapped = yes; then - -$as_echo "#define HAVE_MMAP 1" >>confdefs.h - -fi -rm -f conftest.mmap conftest.txt - -if test $use_mmap_for_buffers = yes; then - -$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h - - REL_ALLOC=no -fi - -LIBS="$LIBS_SYSTEM $LIBS" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dnet_dnet_ntoa=yes -else - ac_cv_lib_dnet_dnet_ntoa=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDNET 1 -_ACEOF - - LIBS="-ldnet $LIBS" - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 -$as_echo_n "checking for main in -lXbsd... " >&6; } -if ${ac_cv_lib_Xbsd_main+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXbsd $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xbsd_main=yes -else - ac_cv_lib_Xbsd_main=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 -$as_echo "$ac_cv_lib_Xbsd_main" >&6; } -if test "x$ac_cv_lib_Xbsd_main" = xyes; then : - LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 -$as_echo_n "checking for cma_open in -lpthreads... " >&6; } -if ${ac_cv_lib_pthreads_cma_open+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthreads $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cma_open (); -int -main () -{ -return cma_open (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthreads_cma_open=yes -else - ac_cv_lib_pthreads_cma_open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 -$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } -if test "x$ac_cv_lib_pthreads_cma_open" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREADS 1 -_ACEOF - - LIBS="-lpthreads $LIBS" - -fi - - -## Note: when using cpp in s/aix4.2.h, this definition depended on -## HAVE_LIBPTHREADS. That was not defined earlier in configure when -## the system file was sourced. Hence the value of LIBS_SYSTEM -## added to LIBS in configure would never contain the pthreads part, -## but the value used in Makefiles might. FIXME? -## -## -lpthreads seems to be necessary for Xlib in X11R6, and should -## be harmless on older versions of X where it happens to exist. -test "$opsys" = "aix4-2" && \ - test $ac_cv_lib_pthreads_cma_open = yes && \ - LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" - - -case ${host_os} in -aix*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 -$as_echo_n "checking for -bbigtoc option... " >&6; } -if ${gdb_cv_bigtoc+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case $GCC in - yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; - *) gdb_cv_bigtoc=-bbigtoc ;; - esac - - LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -int i; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - gdb_cv_bigtoc= -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 -$as_echo "$gdb_cv_bigtoc" >&6; } - ;; -esac - -# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets -# used for the tests that follow. We set them back to REAL_CFLAGS and -# REAL_CPPFLAGS later on. - -REAL_CFLAGS="$CFLAGS" -REAL_CPPFLAGS="$CPPFLAGS" - -if test "${HAVE_X11}" = "yes"; then - DEFS="$C_SWITCH_X_SITE $DEFS" - LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" - LIBS="-lX11 $LIBS" - CFLAGS="$C_SWITCH_X_SITE $CFLAGS" - CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" - - # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. - # This is handled by LD_SWITCH_X_SITE_AUX during the real build, - # but it's more convenient here to set LD_RUN_PATH - # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX. - if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then - LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH - export LD_RUN_PATH - fi - - if test "${opsys}" = "gnu-linux"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5 -$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -XOpenDisplay ("foo"); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - xlinux_first_failure=no -else - xlinux_first_failure=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "${xlinux_first_failure}" = "yes"; then - OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" - OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" - OLD_CPPFLAGS="$CPPFLAGS" - OLD_LIBS="$LIBS" - LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" - C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" - CPPFLAGS="$CPPFLAGS -b i486-linuxaout" - LIBS="$LIBS -b i486-linuxaout" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -XOpenDisplay ("foo"); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - xlinux_second_failure=no -else - xlinux_second_failure=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "${xlinux_second_failure}" = "yes"; then - # If we get the same failure with -b, there is no use adding -b. - # So take it out. This plays safe. - LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" - C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" - CPPFLAGS="$OLD_CPPFLAGS" - LIBS="$OLD_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - fi - - # Reportedly, some broken Solaris systems have XKBlib.h but are missing - # header files included from there. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5 -$as_echo_n "checking for Xkb... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () -{ -XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_xkb=yes -else - emacs_xkb=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5 -$as_echo "$emacs_xkb" >&6; } - if test $emacs_xkb = yes; then - -$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h - - fi - - for ac_func in XrmSetDatabase XScreenResourceString \ -XScreenNumberOfScreen XSetWMProtocols -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -fi - -if test "${window_system}" = "x11"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 -$as_echo_n "checking X11 version 6... " >&6; } - if ${emacs_cv_x11_version_6+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if XlibSpecificationRelease < 6 -fail; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_x11_version_6=yes -else - emacs_cv_x11_version_6=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - if test $emacs_cv_x11_version_6 = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 -$as_echo "6 or newer" >&6; } - -$as_echo "#define HAVE_X11R6 1" >>confdefs.h - - -$as_echo "#define HAVE_X_I18N 1" >>confdefs.h - - ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style - ## XIM support. - case "$opsys" in - sol2-*) : ;; - *) -$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h - - ;; - esac - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 -$as_echo "before 6" >&6; } - fi -fi - - -### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. -HAVE_RSVG=no -if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then - if test "${with_rsvg}" != "no"; then - RSVG_REQUIRED=2.11.0 - RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" - - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - : - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5 -$as_echo_n "checking for $RSVG_MODULE... " >&6; } - - if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5 -$as_echo_n "checking RSVG_CFLAGS... " >&6; } - RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5 -$as_echo "$RSVG_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5 -$as_echo_n "checking RSVG_LIBS... " >&6; } - RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5 -$as_echo "$RSVG_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - RSVG_CFLAGS="" - RSVG_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_RSVG=yes - else - : - fi - - - - - if test $HAVE_RSVG = yes; then - -$as_echo "#define HAVE_RSVG 1" >>confdefs.h - - CFLAGS="$CFLAGS $RSVG_CFLAGS" - LIBS="$RSVG_LIBS $LIBS" - fi - fi -fi - -HAVE_IMAGEMAGICK=no -if test "${HAVE_X11}" = "yes"; then - if test "${with_imagemagick}" != "no"; then - IMAGEMAGICK_MODULE="Wand" - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - : - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5 -$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } - - if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_CFLAGS" >&5 -$as_echo_n "checking IMAGEMAGICK_CFLAGS... " >&6; } - IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_CFLAGS" >&5 -$as_echo "$IMAGEMAGICK_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_LIBS" >&5 -$as_echo_n "checking IMAGEMAGICK_LIBS... " >&6; } - IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_LIBS" >&5 -$as_echo "$IMAGEMAGICK_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - IMAGEMAGICK_CFLAGS="" - IMAGEMAGICK_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_IMAGEMAGICK=yes - else - : - fi - - - - - if test $HAVE_IMAGEMAGICK = yes; then - -$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h - - CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" - LIBS="$IMAGEMAGICK_LIBS $LIBS" - for ac_func in MagickExportImagePixels -do : - ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels" -if test "x$ac_cv_func_MagickExportImagePixels" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MAGICKEXPORTIMAGEPIXELS 1 -_ACEOF - -fi -done - - fi - fi -fi - - -HAVE_GTK=no -if test "${with_gtk3}" = "yes"; then - GLIB_REQUIRED=2.28 - GTK_REQUIRED=3.0 - GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" - - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - pkg_check_gtk=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 -$as_echo_n "checking for $GTK_MODULES... " >&6; } - - if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 -$as_echo_n "checking GTK_CFLAGS... " >&6; } - GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 -$as_echo "$GTK_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 -$as_echo_n "checking GTK_LIBS... " >&6; } - GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 -$as_echo "$GTK_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - GTK_CFLAGS="" - GTK_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - pkg_check_gtk=yes - else - pkg_check_gtk=no - fi - - if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 - fi - -$as_echo "#define HAVE_GTK3 1" >>confdefs.h - -fi - -if test "$pkg_check_gtk" != "yes"; then - HAVE_GTK=no -if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then - GLIB_REQUIRED=2.6 - GTK_REQUIRED=2.6 - GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" - - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - pkg_check_gtk=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 -$as_echo_n "checking for $GTK_MODULES... " >&6; } - - if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 -$as_echo_n "checking GTK_CFLAGS... " >&6; } - GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 -$as_echo "$GTK_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 -$as_echo_n "checking GTK_LIBS... " >&6; } - GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 -$as_echo "$GTK_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - GTK_CFLAGS="" - GTK_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - pkg_check_gtk=yes - else - pkg_check_gtk=no - fi - - if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 - fi -fi -fi - -GTK_OBJ= -if test x"$pkg_check_gtk" = xyes; then - - - - C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$GTK_LIBS $LIBS" - GTK_COMPILES=no - for ac_func in gtk_main -do : - ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" -if test "x$ac_cv_func_gtk_main" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GTK_MAIN 1 -_ACEOF - GTK_COMPILES=yes -fi -done - - if test "${GTK_COMPILES}" != "yes"; then - if test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; - fi - else - HAVE_GTK=yes - -$as_echo "#define USE_GTK 1" >>confdefs.h - - GTK_OBJ=gtkutil.o - USE_X_TOOLKIT=none - if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then - : - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with - closing open displays. This is no problem if you just use - one display, but if you use more than one and close one of them - Emacs may crash." >&5 -$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with - closing open displays. This is no problem if you just use - one display, but if you use more than one and close one of them - Emacs may crash." >&2;} - sleep 3 - fi - fi - -fi - - - -if test "${HAVE_GTK}" = "yes"; then - - if test "$with_toolkit_scroll_bars" != no; then - with_toolkit_scroll_bars=yes - fi - - HAVE_GTK_FILE_SELECTION=no - ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default -#include -" -if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = xyes; then : - HAVE_GTK_FILE_SELECTION=yes -else - HAVE_GTK_FILE_SELECTION=no -fi - - if test "$HAVE_GTK_FILE_SELECTION" = yes; then - for ac_func in gtk_file_selection_new -do : - ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" -if test "x$ac_cv_func_gtk_file_selection_new" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GTK_FILE_SELECTION_NEW 1 -_ACEOF - -fi -done - - fi - - HAVE_GTK_AND_PTHREAD=no - for ac_header in pthread.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_H 1 -_ACEOF - -fi - -done - - if test "$ac_cv_header_pthread_h"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 -$as_echo_n "checking for pthread_self in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_self (); -int -main () -{ -return pthread_self (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_self=yes -else - ac_cv_lib_pthread_pthread_self=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } -if test "x$ac_cv_lib_pthread_pthread_self" = xyes; then : - HAVE_GTK_AND_PTHREAD=yes -fi - - fi - if test "$HAVE_GTK_AND_PTHREAD" = yes; then - case "${canonical}" in - *-hpux*) ;; - *) GTK_LIBS="$GTK_LIBS -lpthread" ;; - esac - -$as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h - - fi - - for ac_func in gtk_widget_get_window gtk_widget_set_has_window \ - gtk_dialog_get_action_area gtk_widget_get_sensitive \ - gtk_widget_get_mapped gtk_adjustment_get_page_size \ - gtk_orientable_set_orientation -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -fi - -HAVE_DBUS=no -DBUS_OBJ= -if test "${with_dbus}" = "yes"; then - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - HAVE_DBUS=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5 -$as_echo_n "checking for dbus-1 >= 1.0... " >&6; } - - if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5 -$as_echo_n "checking DBUS_CFLAGS... " >&6; } - DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5 -$as_echo "$DBUS_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5 -$as_echo_n "checking DBUS_LIBS... " >&6; } - DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5 -$as_echo "$DBUS_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - DBUS_CFLAGS="" - DBUS_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_DBUS=yes - else - HAVE_DBUS=no - fi - - if test "$HAVE_DBUS" = yes; then - LIBS="$LIBS $DBUS_LIBS" - -$as_echo "#define HAVE_DBUS 1" >>confdefs.h - - for ac_func in dbus_watch_get_unix_fd -do : - ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd" -if test "x$ac_cv_func_dbus_watch_get_unix_fd" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DBUS_WATCH_GET_UNIX_FD 1 -_ACEOF - -fi -done - - DBUS_OBJ=dbusbind.o - fi -fi - - -HAVE_GCONF=no -if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - HAVE_GCONF=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5 -$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } - - if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5 -$as_echo_n "checking GCONF_CFLAGS... " >&6; } - GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5 -$as_echo "$GCONF_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5 -$as_echo_n "checking GCONF_LIBS... " >&6; } - GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5 -$as_echo "$GCONF_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - GCONF_CFLAGS="" - GCONF_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_GCONF=yes - else - HAVE_GCONF=no - fi - - if test "$HAVE_GCONF" = yes; then - -$as_echo "#define HAVE_GCONF 1" >>confdefs.h - - for ac_func in g_type_init -do : - ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" -if test "x$ac_cv_func_g_type_init" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_G_TYPE_INIT 1 -_ACEOF - -fi -done - - fi -fi - -HAVE_LIBSELINUX=no -LIBSELINUX_LIBS= -if test "${with_selinux}" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 -$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } -if ${ac_cv_lib_selinux_lgetfilecon+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lselinux $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char lgetfilecon (); -int -main () -{ -return lgetfilecon (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_selinux_lgetfilecon=yes -else - ac_cv_lib_selinux_lgetfilecon=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 -$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } -if test "x$ac_cv_lib_selinux_lgetfilecon" = xyes; then : - HAVE_LIBSELINUX=yes -else - HAVE_LIBSELINUX=no -fi - - if test "$HAVE_LIBSELINUX" = yes; then - -$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h - - LIBSELINUX_LIBS=-lselinux - fi -fi - - -HAVE_GNUTLS=no -if test "${with_gnutls}" = "yes" ; then - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - HAVE_GNUTLS=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.2.4" >&5 -$as_echo_n "checking for gnutls >= 2.2.4... " >&6; } - - if $PKG_CONFIG --exists "gnutls >= 2.2.4" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_CFLAGS" >&5 -$as_echo_n "checking LIBGNUTLS_CFLAGS... " >&6; } - LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.2.4"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_CFLAGS" >&5 -$as_echo "$LIBGNUTLS_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_LIBS" >&5 -$as_echo_n "checking LIBGNUTLS_LIBS... " >&6; } - LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.2.4"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_LIBS" >&5 -$as_echo "$LIBGNUTLS_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - LIBGNUTLS_CFLAGS="" - LIBGNUTLS_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.2.4"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_GNUTLS=yes - else - HAVE_GNUTLS=no - fi - - if test "${HAVE_GNUTLS}" = "yes"; then - -$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h - - fi -fi - - - -HAVE_XAW3D=no -LUCID_LIBW= -if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then - if test "$with_xaw3d" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 -$as_echo_n "checking for xaw3d... " >&6; } - if ${emacs_cv_xaw3d+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 -$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } -if ${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXaw3d $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XawScrollbarSetThumb (); -int -main () -{ -return XawScrollbarSetThumb (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes -else - ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 -$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } -if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = xyes; then : - emacs_cv_xaw3d=yes -else - emacs_cv_xaw3d=no -fi - -else - emacs_cv_xaw3d=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - else - emacs_cv_xaw3d=no - fi - if test $emacs_cv_xaw3d = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 -$as_echo "yes; using Lucid toolkit" >&6; } - USE_X_TOOLKIT=LUCID - HAVE_XAW3D=yes - LUCID_LIBW=-lXaw3d - -$as_echo "#define HAVE_XAW3D 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 -$as_echo_n "checking for libXaw... " >&6; } - if ${emacs_cv_xaw+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_xaw=yes -else - emacs_cv_xaw=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - if test $emacs_cv_xaw = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 -$as_echo "yes; using Lucid toolkit" >&6; } - USE_X_TOOLKIT=LUCID - LUCID_LIBW=-lXaw - elif test x"${USE_X_TOOLKIT}" = xLUCID; then - as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5 -$as_echo "no; do not use toolkit by default" >&6; } - USE_X_TOOLKIT=none - fi - fi -fi - -X_TOOLKIT_TYPE=$USE_X_TOOLKIT - -LIBXTR6= -if test "${USE_X_TOOLKIT}" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 -$as_echo_n "checking X11 toolkit version... " >&6; } - if ${emacs_cv_x11_toolkit_version_6+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if XtSpecificationRelease < 6 -fail; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_x11_toolkit_version_6=yes -else - emacs_cv_x11_toolkit_version_6=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 - if test $emacs_cv_x11_toolkit_version_6 = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 -$as_echo "6 or newer" >&6; } - -$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h - - LIBXTR6="-lSM -lICE" - case "$opsys" in - ## Use libw.a along with X11R6 Xt. - unixware) LIBXTR6="$LIBXTR6 -lw" ;; - esac - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 -$as_echo "before 6" >&6; } - fi - - OLDLIBS="$LIBS" - if test x$HAVE_X11XTR6 = xyes; then - LIBS="-lXt -lSM -lICE $LIBS" - else - LIBS="-lXt $LIBS" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 -$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } -if ${ac_cv_lib_Xmu_XmuConvertStandardSelection+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXmu $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XmuConvertStandardSelection (); -int -main () -{ -return XmuConvertStandardSelection (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xmu_XmuConvertStandardSelection=yes -else - ac_cv_lib_Xmu_XmuConvertStandardSelection=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 -$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } -if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBXMU 1 -_ACEOF - - LIBS="-lXmu $LIBS" - -fi - - test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" -fi - - -LIBXMU=-lXmu -case $opsys in - ## These systems don't supply Xmu. - hpux* | aix4-2 ) - test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= - ;; -esac - - -# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. -if test "${HAVE_X11}" = "yes"; then - if test "${USE_X_TOOLKIT}" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 -$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } -if ${ac_cv_lib_Xext_XShapeQueryExtension+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXext $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XShapeQueryExtension (); -int -main () -{ -return XShapeQueryExtension (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xext_XShapeQueryExtension=yes -else - ac_cv_lib_Xext_XShapeQueryExtension=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 -$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } -if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBXEXT 1 -_ACEOF - - LIBS="-lXext $LIBS" - -fi - - fi -fi - -LIBXP= -if test "${USE_X_TOOLKIT}" = "MOTIF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5 -$as_echo_n "checking for Motif version 2.1... " >&6; } -if ${emacs_cv_motif_version_2_1+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) -int x = 5; -#else -Motif version prior to 2.1. -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_motif_version_2_1=yes -else - emacs_cv_motif_version_2_1=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5 -$as_echo "$emacs_cv_motif_version_2_1" >&6; } - if test $emacs_cv_motif_version_2_1 = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 -$as_echo_n "checking for XpCreateContext in -lXp... " >&6; } -if ${ac_cv_lib_Xp_XpCreateContext+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXp $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XpCreateContext (); -int -main () -{ -return XpCreateContext (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xp_XpCreateContext=yes -else - ac_cv_lib_Xp_XpCreateContext=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 -$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } -if test "x$ac_cv_lib_Xp_XpCreateContext" = xyes; then : - LIBXP=-lXp -fi - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 -$as_echo_n "checking for LessTif where some systems put it... " >&6; } -if ${emacs_cv_lesstif+:} false; then : - $as_echo_n "(cached) " >&6 -else - # We put this in CFLAGS temporarily to precede other -I options - # that might be in CFLAGS temporarily. - # We put this in CPPFLAGS where it precedes the other -I options. - OLD_CPPFLAGS=$CPPFLAGS - OLD_CFLAGS=$CFLAGS - CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" - CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int x = 5; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_lesstif=yes -else - emacs_cv_lesstif=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5 -$as_echo "$emacs_cv_lesstif" >&6; } - if test $emacs_cv_lesstif = yes; then - # Make sure this -I option remains in CPPFLAGS after it is set - # back to REAL_CPPFLAGS. - # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not - # have those other -I options anyway. Ultimately, having this - # directory ultimately in CPPFLAGS will be enough. - REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" - LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" - else - CFLAGS=$OLD_CFLAGS - CPPFLAGS=$OLD_CPPFLAGS - fi - fi -fi - - -USE_TOOLKIT_SCROLL_BARS=no -if test "${with_toolkit_scroll_bars}" != "no"; then - if test "${USE_X_TOOLKIT}" != "none"; then - if test "${USE_X_TOOLKIT}" = "MOTIF"; then - $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h - - HAVE_XAW3D=no - USE_TOOLKIT_SCROLL_BARS=yes - elif test "${HAVE_XAW3D}" = "yes"; then - $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h - - USE_TOOLKIT_SCROLL_BARS=yes - fi - elif test "${HAVE_GTK}" = "yes"; then - $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h - - USE_TOOLKIT_SCROLL_BARS=yes - elif test "${HAVE_NS}" = "yes"; then - $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h - - USE_TOOLKIT_SCROLL_BARS=yes - fi -fi - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include -int -main () -{ -XIMProc callback; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - HAVE_XIM=yes - -$as_echo "#define HAVE_XIM 1" >>confdefs.h - -else - HAVE_XIM=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -if test "${with_xim}" != "no"; then - -$as_echo "#define USE_XIM 1" >>confdefs.h - -fi - - -if test "${HAVE_XIM}" != "no"; then - late_CFLAGS=$CFLAGS - if test "$GCC" = yes; then - CFLAGS="$CFLAGS --pedantic-errors" - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int -main () -{ -Display *display; -XrmDatabase db; -char *res_name; -char *res_class; -XIMProc callback; -XPointer *client_data; -#ifndef __GNUC__ -/* If we're not using GCC, it's probably not XFree86, and this is - probably right, but we can't use something like --pedantic-errors. */ -extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, - char*, XIMProc, XPointer*); -#endif -(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, - client_data); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_arg6_star=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$emacs_cv_arg6_star" = yes; then - $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h - - else - $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h - - fi - CFLAGS=$late_CFLAGS -fi - -### Start of font-backend (under any platform) section. -# (nothing here yet -- this is a placeholder) -### End of font-backend (under any platform) section. - -### Start of font-backend (under X11) section. -if test "${HAVE_X11}" = "yes"; then - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - HAVE_FC=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5 -$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } - - if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5 -$as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; } - FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5 -$as_echo "$FONTCONFIG_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5 -$as_echo_n "checking FONTCONFIG_LIBS... " >&6; } - FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5 -$as_echo "$FONTCONFIG_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - FONTCONFIG_CFLAGS="" - FONTCONFIG_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_FC=yes - else - HAVE_FC=no - fi - - - ## Use -lXft if available, unless `--with-xft=no'. - HAVE_XFT=maybe - if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then - with_xft="no"; - fi - if test "x${with_xft}" != "xno"; then - - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - HAVE_XFT=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5 -$as_echo_n "checking for xft >= 0.13.0... " >&6; } - - if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5 -$as_echo_n "checking XFT_CFLAGS... " >&6; } - XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5 -$as_echo "$XFT_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5 -$as_echo_n "checking XFT_LIBS... " >&6; } - XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5 -$as_echo "$XFT_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - XFT_CFLAGS="" - XFT_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - : - else - HAVE_XFT=no - fi - - ## Because xftfont.c uses XRenderQueryExtension, we also - ## need to link to -lXrender. - HAVE_XRENDER=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 -$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } -if ${ac_cv_lib_Xrender_XRenderQueryExtension+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXrender $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XRenderQueryExtension (); -int -main () -{ -return XRenderQueryExtension (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xrender_XRenderQueryExtension=yes -else - ac_cv_lib_Xrender_XRenderQueryExtension=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 -$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } -if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = xyes; then : - HAVE_XRENDER=yes -fi - - if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then - OLD_CPPFLAGS="$CPPFLAGS" - OLD_CFLAGS="$CFLAGS" - OLD_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" - CFLAGS="$CFLAGS $XFT_CFLAGS" - XFT_LIBS="-lXrender $XFT_LIBS" - LIBS="$XFT_LIBS $LIBS" - ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_Xft_Xft_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 -$as_echo_n "checking for XftFontOpen in -lXft... " >&6; } -if ${ac_cv_lib_Xft_XftFontOpen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXft $XFT_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XftFontOpen (); -int -main () -{ -return XftFontOpen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xft_XftFontOpen=yes -else - ac_cv_lib_Xft_XftFontOpen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 -$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } -if test "x$ac_cv_lib_Xft_XftFontOpen" = xyes; then : - HAVE_XFT=yes -fi - -fi - - - - if test "${HAVE_XFT}" = "yes"; then - -$as_echo "#define HAVE_XFT 1" >>confdefs.h - - - C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" - else - CPPFLAGS="$OLD_CPPFLAGS" - CFLAGS="$OLD_CFLAGS" - LIBS="$OLD_LIBS" - fi # "${HAVE_XFT}" = "yes" - fi # "$HAVE_XFT" != no - fi # "x${with_xft}" != "xno" - - ## We used to allow building with FreeType and without Xft. - ## However, the ftx font backend driver is not in good shape. - if test "$HAVE_XFT" != "yes"; then - HAVE_XFT=no - HAVE_FREETYPE=no - else - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - HAVE_FREETYPE=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5 -$as_echo_n "checking for freetype2... " >&6; } - - if $PKG_CONFIG --exists "freetype2" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_CFLAGS" >&5 -$as_echo_n "checking FREETYPE_CFLAGS... " >&6; } - FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_CFLAGS" >&5 -$as_echo "$FREETYPE_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_LIBS" >&5 -$as_echo_n "checking FREETYPE_LIBS... " >&6; } - FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIBS" >&5 -$as_echo "$FREETYPE_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - FREETYPE_CFLAGS="" - FREETYPE_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_FREETYPE=yes - else - HAVE_FREETYPE=no - fi - - - test "$HAVE_FREETYPE" = "no" && as_fn_error $? "libxft requires libfreetype" "$LINENO" 5 - fi - - HAVE_LIBOTF=no - if test "${HAVE_FREETYPE}" = "yes"; then - -$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h - - if test "${with_libotf}" != "no"; then - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - HAVE_LIBOTF=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5 -$as_echo_n "checking for libotf... " >&6; } - - if $PKG_CONFIG --exists "libotf" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5 -$as_echo_n "checking LIBOTF_CFLAGS... " >&6; } - LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5 -$as_echo "$LIBOTF_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5 -$as_echo_n "checking LIBOTF_LIBS... " >&6; } - LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5 -$as_echo "$LIBOTF_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - LIBOTF_CFLAGS="" - LIBOTF_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_LIBOTF=yes - else - HAVE_LIBOTF=no - fi - - if test "$HAVE_LIBOTF" = "yes"; then - -$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 -$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } -if ${ac_cv_lib_otf_OTF_get_variation_glyphs+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lotf $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char OTF_get_variation_glyphs (); -int -main () -{ -return OTF_get_variation_glyphs (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_otf_OTF_get_variation_glyphs=yes -else - ac_cv_lib_otf_OTF_get_variation_glyphs=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 -$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } -if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = xyes; then : - HAVE_OTF_GET_VARIATION_GLYPHS=yes -else - HAVE_OTF_GET_VARIATION_GLYPHS=no -fi - - if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then - -$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h - - fi - fi - fi - fi - - HAVE_M17N_FLT=no - if test "${HAVE_LIBOTF}" = yes; then - if test "${with_m17n_flt}" != "no"; then - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - HAVE_M17N_FLT=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5 -$as_echo_n "checking for m17n-flt... " >&6; } - - if $PKG_CONFIG --exists "m17n-flt" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5 -$as_echo_n "checking M17N_FLT_CFLAGS... " >&6; } - M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5 -$as_echo "$M17N_FLT_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5 -$as_echo_n "checking M17N_FLT_LIBS... " >&6; } - M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5 -$as_echo "$M17N_FLT_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - M17N_FLT_CFLAGS="" - M17N_FLT_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_M17N_FLT=yes - else - HAVE_M17N_FLT=no - fi - - if test "$HAVE_M17N_FLT" = "yes"; then - -$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h - - fi - fi - fi -else - HAVE_XFT=no - HAVE_FREETYPE=no - HAVE_LIBOTF=no - HAVE_M17N_FLT=no -fi - -### End of font-backend (under X11) section. - - - - - - - - - - -### Use -lXpm if available, unless `--with-xpm=no'. -HAVE_XPM=no -LIBXPM= -if test "${HAVE_X11}" = "yes"; then - if test "${with_xpm}" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_xpm_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 -$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } -if ${ac_cv_lib_Xpm_XpmReadFileToPixmap+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXpm -lX11 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XpmReadFileToPixmap (); -int -main () -{ -return XpmReadFileToPixmap (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xpm_XpmReadFileToPixmap=yes -else - ac_cv_lib_Xpm_XpmReadFileToPixmap=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 -$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } -if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = xyes; then : - HAVE_XPM=yes -fi - -fi - - - if test "${HAVE_XPM}" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 -$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include "X11/xpm.h" -#ifndef XpmReturnAllocPixels -no_return_alloc_pixels -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : - HAVE_XPM=no -else - HAVE_XPM=yes -fi -rm -f conftest* - - - if test "${HAVE_XPM}" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - fi - fi - - if test "${HAVE_XPM}" = "yes"; then - -$as_echo "#define HAVE_XPM 1" >>confdefs.h - - LIBXPM=-lXpm - fi -fi - - -### Use -ljpeg if available, unless `--with-jpeg=no'. -HAVE_JPEG=no -LIBJPEG= -if test "${HAVE_X11}" = "yes"; then - if test "${with_jpeg}" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" -if test "x$ac_cv_header_jerror_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 -$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } -if ${ac_cv_lib_jpeg_jpeg_destroy_compress+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ljpeg $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char jpeg_destroy_compress (); -int -main () -{ -return jpeg_destroy_compress (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_jpeg_jpeg_destroy_compress=yes -else - ac_cv_lib_jpeg_jpeg_destroy_compress=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 -$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } -if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = xyes; then : - HAVE_JPEG=yes -fi - -fi - - - fi - - if test "${HAVE_JPEG}" = "yes"; then - $as_echo "#define HAVE_JPEG 1" >>confdefs.h - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - version=JPEG_LIB_VERSION - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : - $as_echo "#define HAVE_JPEG 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 -$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} - HAVE_JPEG=no -fi -rm -f conftest* - - fi - if test "${HAVE_JPEG}" = "yes"; then - LIBJPEG=-ljpeg - fi -fi - - -### Use -lpng if available, unless `--with-png=no'. -HAVE_PNG=no -LIBPNG= -if test "${HAVE_X11}" = "yes"; then - if test "${with_png}" != "no"; then - # Debian unstable as of July 2003 has multiple libpngs, and puts png.h - # in /usr/include/libpng. - for ac_header in png.h libpng/png.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 -$as_echo_n "checking for png_get_channels in -lpng... " >&6; } -if ${ac_cv_lib_png_png_get_channels+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpng -lz -lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char png_get_channels (); -int -main () -{ -return png_get_channels (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_png_png_get_channels=yes -else - ac_cv_lib_png_png_get_channels=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 -$as_echo "$ac_cv_lib_png_png_get_channels" >&6; } -if test "x$ac_cv_lib_png_png_get_channels" = xyes; then : - HAVE_PNG=yes -fi - - fi - fi - - if test "${HAVE_PNG}" = "yes"; then - -$as_echo "#define HAVE_PNG 1" >>confdefs.h - - LIBPNG="-lpng -lz -lm" - fi -fi - - -### Use -ltiff if available, unless `--with-tiff=no'. -HAVE_TIFF=no -LIBTIFF= -if test "${HAVE_X11}" = "yes"; then - if test "${with_tiff}" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" -if test "x$ac_cv_header_tiffio_h" = xyes; then : - tifflibs="-lz -lm" - # At least one tiff package requires the jpeg library. - if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 -$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } -if ${ac_cv_lib_tiff_TIFFGetVersion+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ltiff $tifflibs $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char TIFFGetVersion (); -int -main () -{ -return TIFFGetVersion (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_tiff_TIFFGetVersion=yes -else - ac_cv_lib_tiff_TIFFGetVersion=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 -$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } -if test "x$ac_cv_lib_tiff_TIFFGetVersion" = xyes; then : - HAVE_TIFF=yes -fi - -fi - - - fi - - if test "${HAVE_TIFF}" = "yes"; then - -$as_echo "#define HAVE_TIFF 1" >>confdefs.h - - LIBTIFF=-ltiff - fi -fi - - -### Use -lgif or -lungif if available, unless `--with-gif=no'. -HAVE_GIF=no -LIBGIF= -if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" -if test "x$ac_cv_header_gif_lib_h" = xyes; then : - # EGifPutExtensionLast only exists from version libungif-4.1.0b1. -# Earlier versions can crash Emacs. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 -$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } -if ${ac_cv_lib_gif_EGifPutExtensionLast+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgif $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char EGifPutExtensionLast (); -int -main () -{ -return EGifPutExtensionLast (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gif_EGifPutExtensionLast=yes -else - ac_cv_lib_gif_EGifPutExtensionLast=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 -$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } -if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = xyes; then : - HAVE_GIF=yes -else - HAVE_GIF=maybe -fi - -fi - - - - if test "$HAVE_GIF" = yes; then - LIBGIF=-lgif - elif test "$HAVE_GIF" = maybe; then -# If gif_lib.h but no libgif, try libungif. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 -$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } -if ${ac_cv_lib_ungif_EGifPutExtensionLast+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lungif $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char EGifPutExtensionLast (); -int -main () -{ -return EGifPutExtensionLast (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ungif_EGifPutExtensionLast=yes -else - ac_cv_lib_ungif_EGifPutExtensionLast=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 -$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } -if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = xyes; then : - HAVE_GIF=yes -else - HAVE_GIF=no -fi - - test "$HAVE_GIF" = yes && LIBGIF=-lungif - fi - - if test "${HAVE_GIF}" = "yes"; then - -$as_echo "#define HAVE_GIF 1" >>confdefs.h - - fi -fi - - -if test "${HAVE_X11}" = "yes"; then - MISSING="" - WITH_NO="" - test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && - MISSING="libXpm" && WITH_NO="--with-xpm=no" - test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && - MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" - test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && - MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" - test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && - MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" - test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && - MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" - - if test "X${MISSING}" != X; then - as_fn_error $? "The following required libraries were not found: - $MISSING -Maybe some development libraries/packages are missing? -If you don't want to link with them give - $WITH_NO -as options to configure" "$LINENO" 5 - fi -fi - -### Use -lgpm if available, unless `--with-gpm=no'. -HAVE_GPM=no -LIBGPM= -MOUSE_SUPPORT= -if test "${with_gpm}" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" -if test "x$ac_cv_header_gpm_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 -$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } -if ${ac_cv_lib_gpm_Gpm_Open+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgpm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char Gpm_Open (); -int -main () -{ -return Gpm_Open (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gpm_Gpm_Open=yes -else - ac_cv_lib_gpm_Gpm_Open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 -$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } -if test "x$ac_cv_lib_gpm_Gpm_Open" = xyes; then : - HAVE_GPM=yes -fi - -fi - - - - if test "${HAVE_GPM}" = "yes"; then - -$as_echo "#define HAVE_GPM 1" >>confdefs.h - - LIBGPM=-lgpm - ## May be reset below. - MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)" - fi -fi - - -ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_malloc_h" = xyes; then : - -$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h - -fi - - - -C_SWITCH_X_SYSTEM= -### Use NeXTstep API to implement GUI. -if test "${HAVE_NS}" = "yes"; then - -$as_echo "#define HAVE_NS 1" >>confdefs.h - - if test "${NS_IMPL_COCOA}" = "yes"; then - -$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h - - GNU_OBJC_CFLAGS= - fi - if test "${NS_IMPL_GNUSTEP}" = "yes"; then - -$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h - - # See also .m.o rule in Makefile.in */ - # FIXME: are all these flags really needed? Document here why. */ - C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" - GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" - fi - if test "${NS_HAVE_NSINTEGER}" = "yes"; then - -$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h - - fi - # We also have mouse menus. - HAVE_MENUS=yes - OTHER_FILES=ns-app -fi - - -### Use session management (-lSM -lICE) if available -HAVE_X_SM=no -LIBXSM= -if test "${HAVE_X11}" = "yes"; then - ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 -$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } -if ${ac_cv_lib_SM_SmcOpenConnection+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lSM -lICE $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char SmcOpenConnection (); -int -main () -{ -return SmcOpenConnection (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_SM_SmcOpenConnection=yes -else - ac_cv_lib_SM_SmcOpenConnection=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 -$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } -if test "x$ac_cv_lib_SM_SmcOpenConnection" = xyes; then : - HAVE_X_SM=yes -fi - -fi - - - - if test "${HAVE_X_SM}" = "yes"; then - -$as_echo "#define HAVE_X_SM 1" >>confdefs.h - - LIBXSM="-lSM -lICE" - case "$LIBS" in - *-lSM*) ;; - *) LIBS="$LIBXSM $LIBS" ;; - esac - fi -fi - - -### Use libxml (-lxml2) if available -if test "${with_xml2}" != "no"; then - ### I'm not sure what the version number should be, so I just guessed. - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$PKG_CONFIG" = "no" ; then - HAVE_LIBXML2=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5 -$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; } - - if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_CFLAGS" >&5 -$as_echo_n "checking LIBXML2_CFLAGS... " >&6; } - LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_CFLAGS" >&5 -$as_echo "$LIBXML2_CFLAGS" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_LIBS" >&5 -$as_echo_n "checking LIBXML2_LIBS... " >&6; } - LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_LIBS" >&5 -$as_echo "$LIBXML2_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - LIBXML2_CFLAGS="" - LIBXML2_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_LIBXML2=yes - else - HAVE_LIBXML2=no - fi - - if test "${HAVE_LIBXML2}" = "yes"; then - LIBS="$LIBXML2_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 -$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } -if ${ac_cv_lib_xml2_htmlReadMemory+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lxml2 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char htmlReadMemory (); -int -main () -{ -return htmlReadMemory (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_xml2_htmlReadMemory=yes -else - ac_cv_lib_xml2_htmlReadMemory=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 -$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } -if test "x$ac_cv_lib_xml2_htmlReadMemory" = xyes; then : - HAVE_LIBXML2=yes -else - HAVE_LIBXML2=no -fi - - if test "${HAVE_LIBXML2}" = "yes"; then - -$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h - - else - LIBXML2_LIBS="" - LIBXML2_CFLAGS="" - fi - fi -fi - - - -# If netdb.h doesn't declare h_errno, we must declare it by hand. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 -$as_echo_n "checking whether netdb declares h_errno... " >&6; } -if ${emacs_cv_netdb_declares_h_errno+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -return h_errno; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_netdb_declares_h_errno=yes -else - emacs_cv_netdb_declares_h_errno=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5 -$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; } -if test $emacs_cv_netdb_declares_h_errno = yes; then - -$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if ${ac_cv_working_alloca_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_working_alloca_h=yes -else - ac_cv_working_alloca_h=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then - -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if ${ac_cv_func_alloca_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -void *alloca (size_t); -# endif -# endif -# endif -# endif -#endif - -int -main () -{ -char *p = (char *) alloca (1); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_alloca_works=yes -else - ac_cv_func_alloca_works=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } - -if test $ac_cv_func_alloca_works = yes; then - -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - -else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. - -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - -$as_echo "#define C_ALLOCA 1" >>confdefs.h - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if ${ac_cv_os_cray+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF - - break -fi - - done -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if ${ac_cv_c_stack_direction+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_c_stack_direction=0 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} - -int -main () -{ - return find_stack_direction () < 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_stack_direction=1 -else - ac_cv_c_stack_direction=-1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF - - -fi - - -if test x"$ac_cv_func_alloca_works" != xyes; then - as_fn_error $? "a system implementation of alloca is required " "$LINENO" 5 -fi - -# fmod, logb, and frexp are found in -lm on most systems. -# On HPUX 9.01, -lm does not contain logb, so check for sqrt. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 -$as_echo_n "checking for sqrt in -lm... " >&6; } -if ${ac_cv_lib_m_sqrt+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sqrt (); -int -main () -{ -return sqrt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_sqrt=yes -else - ac_cv_lib_m_sqrt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 -$as_echo "$ac_cv_lib_m_sqrt" >&6; } -if test "x$ac_cv_lib_m_sqrt" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - - -# Check for mail-locking functions in a "mail" library. Probably this should -# have the same check as for liblockfile below. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 -$as_echo_n "checking for maillock in -lmail... " >&6; } -if ${ac_cv_lib_mail_maillock+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmail $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char maillock (); -int -main () -{ -return maillock (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mail_maillock=yes -else - ac_cv_lib_mail_maillock=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 -$as_echo "$ac_cv_lib_mail_maillock" >&6; } -if test "x$ac_cv_lib_mail_maillock" = xyes; then : - have_mail=yes -else - have_mail=no -fi - -if test $have_mail = yes; then - LIBS_MAIL=-lmail - LIBS="$LIBS_MAIL $LIBS" - -$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h - -else - LIBS_MAIL= -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 -$as_echo_n "checking for maillock in -llockfile... " >&6; } -if ${ac_cv_lib_lockfile_maillock+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llockfile $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char maillock (); -int -main () -{ -return maillock (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lockfile_maillock=yes -else - ac_cv_lib_lockfile_maillock=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 -$as_echo "$ac_cv_lib_lockfile_maillock" >&6; } -if test "x$ac_cv_lib_lockfile_maillock" = xyes; then : - have_lockfile=yes -else - have_lockfile=no -fi - -if test $have_lockfile = yes; then - LIBS_MAIL=-llockfile - LIBS="$LIBS_MAIL $LIBS" - -$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h - -else -# If we have the shared liblockfile, assume we must use it for mail -# locking (e.g. Debian). If we couldn't link against liblockfile -# (no liblockfile.a installed), ensure that we don't need to. - # Extract the first word of "liblockfile.so", so it can be a program name with args. -set dummy liblockfile.so; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_liblockfile+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$liblockfile"; then - ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_liblockfile="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no" -fi -fi -liblockfile=$ac_cv_prog_liblockfile -if test -n "$liblockfile"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5 -$as_echo "$liblockfile" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test $ac_cv_prog_liblockfile = yes; then - as_fn_error $? "Shared liblockfile found but can't link against it. -This probably means that movemail could lose mail. -There may be a \`development' package to install containing liblockfile." "$LINENO" 5 - fi -fi -for ac_func in touchlock -do : - ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock" -if test "x$ac_cv_func_touchlock" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TOUCHLOCK 1 -_ACEOF - -fi -done - -for ac_header in maillock.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default" -if test "x$ac_cv_header_maillock_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MAILLOCK_H 1 -_ACEOF - -fi - -done - - - -## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to -## interlock access to the mail spool. The alternative is a lock file named -## /usr/spool/mail/$USER.lock. -mail_lock=no -case "$opsys" in - aix4-2) mail_lock="lockf" ;; - - gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; - - ## On GNU/Linux systems, both methods are used by various mail programs. - ## I assume most people are using newer mailers that have heard of flock. - ## Change this if you need to. - ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, - ## configure gets the right answers, and that means *NOT* using flock. - ## Using flock is guaranteed to be the wrong thing. See Debian Policy - ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the - ## Debian maintainer hasn't provided a clean fix for Emacs. - ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and - ## HAVE_MAILLOCK_H are defined, so the following appears to be the - ## correct logic. -- fx - ## We must check for HAVE_LIBLOCKFILE too, as movemail does. - ## liblockfile is a Free Software replacement for libmail, used on - ## Debian systems and elsewhere. -rfr. - gnu-*) - mail_lock="flock" - if test $have_mail = yes || test $have_lockfile = yes; then - test $ac_cv_header_maillock_h = yes && mail_lock=no - fi - ;; -esac - -BLESSMAIL_TARGET= -case "$mail_lock" in - flock) -$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h - ;; - - lockf) -$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h - ;; - - *) BLESSMAIL_TARGET="need-blessmail" ;; -esac - - - -for ac_func in gethostname getdomainname dup2 \ -rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ -random lrand48 logb frexp fmod rint cbrt ftime setsid \ -strerror fpathconf select euidaccess getpagesize tzset setlocale \ -utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ -__fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ -sendto recvfrom getsockopt setsockopt getsockname getpeername \ -gai_strerror mkstemp getline getdelim mremap memmove fsync sync \ -memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ -cfmakeraw cfsetspeed isnan copysign __executable_start -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 -$as_echo_n "checking for __builtin_unwind_init... " >&6; } -if ${emacs_cv_func___builtin_unwind_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -__builtin_unwind_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_func___builtin_unwind_init=yes -else - emacs_cv_func___builtin_unwind_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5 -$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; } -if test $emacs_cv_func___builtin_unwind_init = yes; then - -$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h - -fi - -for ac_header in sys/un.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_un_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_UN_H 1 -_ACEOF - -fi - -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if ${ac_cv_sys_largefile_source+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include /* for off_t */ - #include -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_largefile_source=no; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGEFILE_SOURCE 1 -#include /* for off_t */ - #include -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_largefile_source=1; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_cv_sys_largefile_source=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 -$as_echo "$ac_cv_sys_largefile_source" >&6; } -case $ac_cv_sys_largefile_source in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source -_ACEOF -;; -esac -rm -rf conftest* - -# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug -# in glibc 2.1.3, but that breaks too many other things. -# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -if test $ac_cv_sys_largefile_source != unknown; then - -$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 -$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } -if ${ac_cv_func_getpgrp_void+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Use it with a single arg. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -getpgrp (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_func_getpgrp_void=no -else - ac_cv_func_getpgrp_void=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 -$as_echo "$ac_cv_func_getpgrp_void" >&6; } -if test $ac_cv_func_getpgrp_void = yes; then - -$as_echo "#define GETPGRP_VOID 1" >>confdefs.h - -fi - - -# Configure gnulib. - - - - - - - - - - - LIBC_FATAL_STDERR_=1 - export LIBC_FATAL_STDERR_ - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 -$as_echo_n "checking whether strtold conforms to C99... " >&6; } -if ${gl_cv_func_c99_strtold+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* On HP-UX before 11.23, strtold returns a struct instead of - long double. Reject implementations like that, by requiring - compatibility with the C99 prototype. */ - #include - static long double (*p) (char const *, char **) = strtold; - static long double - test (char const *nptr, char **endptr) - { - long double r; - r = strtold (nptr, endptr); - return r; - } -int -main () -{ -return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_c99_strtold=yes -else - gl_cv_func_c99_strtold=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5 -$as_echo "$gl_cv_func_c99_strtold" >&6; } - if test $gl_cv_func_c99_strtold = yes; then - -$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h - - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 -$as_echo_n "checking for st_dm_mode in struct stat... " >&6; } -if ${ac_cv_struct_st_dm_mode+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int -main () -{ -struct stat s; s.st_dm_mode; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_st_dm_mode=yes -else - ac_cv_struct_st_dm_mode=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5 -$as_echo "$ac_cv_struct_st_dm_mode" >&6; } - - if test $ac_cv_struct_st_dm_mode = yes; then - -$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h - - fi - - -ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" -if test "x$ac_cv_have_decl_strmode" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRMODE $ac_have_decl -_ACEOF - - - GNULIB__EXIT=0; - GNULIB_ATOLL=0; - GNULIB_CALLOC_POSIX=0; - GNULIB_CANONICALIZE_FILE_NAME=0; - GNULIB_GETLOADAVG=0; - GNULIB_GETSUBOPT=0; - GNULIB_GRANTPT=0; - GNULIB_MALLOC_POSIX=0; - GNULIB_MBTOWC=0; - GNULIB_MKDTEMP=0; - GNULIB_MKOSTEMP=0; - GNULIB_MKOSTEMPS=0; - GNULIB_MKSTEMP=0; - GNULIB_MKSTEMPS=0; - GNULIB_PTSNAME=0; - GNULIB_PUTENV=0; - GNULIB_RANDOM_R=0; - GNULIB_REALLOC_POSIX=0; - GNULIB_REALPATH=0; - GNULIB_RPMATCH=0; - GNULIB_SETENV=0; - GNULIB_STRTOD=0; - GNULIB_STRTOLL=0; - GNULIB_STRTOULL=0; - GNULIB_SYSTEM_POSIX=0; - GNULIB_UNLOCKPT=0; - GNULIB_UNSETENV=0; - GNULIB_WCTOMB=0; - HAVE__EXIT=1; - HAVE_ATOLL=1; - HAVE_CANONICALIZE_FILE_NAME=1; - HAVE_DECL_GETLOADAVG=1; - HAVE_GETSUBOPT=1; - HAVE_GRANTPT=1; - HAVE_MKDTEMP=1; - HAVE_MKOSTEMP=1; - HAVE_MKOSTEMPS=1; - HAVE_MKSTEMP=1; - HAVE_MKSTEMPS=1; - HAVE_PTSNAME=1; - HAVE_RANDOM_H=1; - HAVE_RANDOM_R=1; - HAVE_REALPATH=1; - HAVE_RPMATCH=1; - HAVE_SETENV=1; - HAVE_DECL_SETENV=1; - HAVE_STRTOD=1; - HAVE_STRTOLL=1; - HAVE_STRTOULL=1; - HAVE_STRUCT_RANDOM_DATA=1; - HAVE_SYS_LOADAVG_H=0; - HAVE_UNLOCKPT=1; - HAVE_DECL_UNSETENV=1; - REPLACE_CALLOC=0; - REPLACE_CANONICALIZE_FILE_NAME=0; - REPLACE_MALLOC=0; - REPLACE_MBTOWC=0; - REPLACE_MKSTEMP=0; - REPLACE_PUTENV=0; - REPLACE_REALLOC=0; - REPLACE_REALPATH=0; - REPLACE_SETENV=0; - REPLACE_STRTOD=0; - REPLACE_UNSETENV=0; - REPLACE_WCTOMB=0; - - - GNULIB_CHOWN=0; - GNULIB_CLOSE=0; - GNULIB_DUP2=0; - GNULIB_DUP3=0; - GNULIB_ENVIRON=0; - GNULIB_EUIDACCESS=0; - GNULIB_FACCESSAT=0; - GNULIB_FCHDIR=0; - GNULIB_FCHOWNAT=0; - GNULIB_FSYNC=0; - GNULIB_FTRUNCATE=0; - GNULIB_GETCWD=0; - GNULIB_GETDOMAINNAME=0; - GNULIB_GETDTABLESIZE=0; - GNULIB_GETGROUPS=0; - GNULIB_GETHOSTNAME=0; - GNULIB_GETLOGIN=0; - GNULIB_GETLOGIN_R=0; - GNULIB_GETPAGESIZE=0; - GNULIB_GETUSERSHELL=0; - GNULIB_LCHOWN=0; - GNULIB_LINK=0; - GNULIB_LINKAT=0; - GNULIB_LSEEK=0; - GNULIB_PIPE=0; - GNULIB_PIPE2=0; - GNULIB_PREAD=0; - GNULIB_PWRITE=0; - GNULIB_READLINK=0; - GNULIB_READLINKAT=0; - GNULIB_RMDIR=0; - GNULIB_SLEEP=0; - GNULIB_SYMLINK=0; - GNULIB_SYMLINKAT=0; - GNULIB_TTYNAME_R=0; - GNULIB_UNISTD_H_GETOPT=0; - GNULIB_UNISTD_H_SIGPIPE=0; - GNULIB_UNLINK=0; - GNULIB_UNLINKAT=0; - GNULIB_USLEEP=0; - GNULIB_WRITE=0; - HAVE_CHOWN=1; - HAVE_DUP2=1; - HAVE_DUP3=1; - HAVE_EUIDACCESS=1; - HAVE_FACCESSAT=1; - HAVE_FCHDIR=1; - HAVE_FCHOWNAT=1; - HAVE_FSYNC=1; - HAVE_FTRUNCATE=1; - HAVE_GETDTABLESIZE=1; - HAVE_GETGROUPS=1; - HAVE_GETHOSTNAME=1; - HAVE_GETLOGIN=1; - HAVE_GETPAGESIZE=1; - HAVE_LCHOWN=1; - HAVE_LINK=1; - HAVE_LINKAT=1; - HAVE_PIPE=1; - HAVE_PIPE2=1; - HAVE_PREAD=1; - HAVE_PWRITE=1; - HAVE_READLINK=1; - HAVE_READLINKAT=1; - HAVE_SLEEP=1; - HAVE_SYMLINK=1; - HAVE_SYMLINKAT=1; - HAVE_UNLINKAT=1; - HAVE_USLEEP=1; - HAVE_DECL_ENVIRON=1; - HAVE_DECL_FCHDIR=1; - HAVE_DECL_GETDOMAINNAME=1; - HAVE_DECL_GETLOGIN_R=1; - HAVE_DECL_GETPAGESIZE=1; - HAVE_DECL_GETUSERSHELL=1; - HAVE_DECL_TTYNAME_R=1; - HAVE_OS_H=0; - HAVE_SYS_PARAM_H=0; - REPLACE_CHOWN=0; - REPLACE_CLOSE=0; - REPLACE_DUP=0; - REPLACE_DUP2=0; - REPLACE_FCHOWNAT=0; - REPLACE_GETCWD=0; - REPLACE_GETDOMAINNAME=0; - REPLACE_GETLOGIN_R=0; - REPLACE_GETGROUPS=0; - REPLACE_GETPAGESIZE=0; - REPLACE_LCHOWN=0; - REPLACE_LINK=0; - REPLACE_LINKAT=0; - REPLACE_LSEEK=0; - REPLACE_PREAD=0; - REPLACE_PWRITE=0; - REPLACE_READLINK=0; - REPLACE_RMDIR=0; - REPLACE_SLEEP=0; - REPLACE_SYMLINK=0; - REPLACE_TTYNAME_R=0; - REPLACE_UNLINK=0; - REPLACE_UNLINKAT=0; - REPLACE_USLEEP=0; - REPLACE_WRITE=0; - UNISTD_H_HAVE_WINSOCK2_H=0; - UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 -$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } -if ${gl_cv_have_include_next+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -rf conftestd1a conftestd1b conftestd2 - mkdir conftestd1a conftestd1b conftestd2 - cat < conftestd1a/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd1b/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd2/conftest.h -#ifndef DEFINED_IN_CONFTESTD1 -#error "include_next test doesn't work" -#endif -#define DEFINED_IN_CONFTESTD2 -EOF - gl_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_have_include_next=yes -else - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_have_include_next=buggy -else - gl_cv_have_include_next=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="$gl_save_CPPFLAGS" - rm -rf conftestd1a conftestd1b conftestd2 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 -$as_echo "$gl_cv_have_include_next" >&6; } - PRAGMA_SYSTEM_HEADER= - if test $gl_cv_have_include_next = yes; then - INCLUDE_NEXT=include_next - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - if test -n "$GCC"; then - PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' - fi - else - if test $gl_cv_have_include_next = buggy; then - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - else - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include - fi - fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 -$as_echo_n "checking whether system header files limit the line length... " >&6; } -if ${gl_cv_pragma_columns+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __TANDEM -choke me -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "choke me" >/dev/null 2>&1; then : - gl_cv_pragma_columns=yes -else - gl_cv_pragma_columns=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 -$as_echo "$gl_cv_pragma_columns" >&6; } - if test $gl_cv_pragma_columns = yes; then - PRAGMA_COLUMNS="#pragma COLUMNS 10000" - else - PRAGMA_COLUMNS= - fi - - - - - - - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_getopt_h='<'getopt.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_getopt_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_getopt_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/getopt.h#{ - s#.*"\(.*/getopt.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_getopt_h='<'getopt.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 -$as_echo "$gl_cv_next_getopt_h" >&6; } - fi - NEXT_GETOPT_H=$gl_cv_next_getopt_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'getopt.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_getopt_h - fi - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_getopt_h = yes; then - HAVE_GETOPT_H=1 - else - HAVE_GETOPT_H=0 - fi - - - gl_replace_getopt= - - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - for ac_header in getopt.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" -if test "x$ac_cv_header_getopt_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT_H 1 -_ACEOF - -else - gl_replace_getopt=yes -fi - -done - - fi - - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - for ac_func in getopt_long_only -do : - ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" -if test "x$ac_cv_func_getopt_long_only" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT_LONG_ONLY 1 -_ACEOF - -else - gl_replace_getopt=yes -fi -done - - fi - - if test -z "$gl_replace_getopt"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 -$as_echo_n "checking whether getopt is POSIX compatible... " >&6; } -if ${gl_cv_func_getopt_posix+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int *p = &optreset; return optreset; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_optind_min=1 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -return !getopt_clip; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_optind_min=1 -else - gl_optind_min=0 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - gl_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" - if test "$cross_compiling" = yes; then : - case "$host_os" in - mingw*) gl_cv_func_getopt_posix="guessing no";; - darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; - *) gl_cv_func_getopt_posix="guessing yes";; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include - -int -main () -{ - { - int argc = 0; - char *argv[10]; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-a"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = OPTIND_MIN; - opterr = 0; - - c = getopt (argc, argv, "ab"); - if (!(c == 'a')) - return 1; - c = getopt (argc, argv, "ab"); - if (!(c == -1)) - return 2; - if (!(optind == 2)) - return 3; - } - /* Some internal state exists at this point. */ - { - int argc = 0; - char *argv[10]; - int c; - - argv[argc++] = "program"; - argv[argc++] = "donald"; - argv[argc++] = "-p"; - argv[argc++] = "billy"; - argv[argc++] = "duck"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = OPTIND_MIN; - opterr = 0; - - c = getopt (argc, argv, "+abp:q:"); - if (!(c == -1)) - return 4; - if (!(strcmp (argv[0], "program") == 0)) - return 5; - if (!(strcmp (argv[1], "donald") == 0)) - return 6; - if (!(strcmp (argv[2], "-p") == 0)) - return 7; - if (!(strcmp (argv[3], "billy") == 0)) - return 8; - if (!(strcmp (argv[4], "duck") == 0)) - return 9; - if (!(strcmp (argv[5], "-a") == 0)) - return 10; - if (!(strcmp (argv[6], "bar") == 0)) - return 11; - if (!(optind == 1)) - return 12; - } - /* Detect MacOS 10.5, AIX 7.1 bug. */ - { - char *argv[3] = { "program", "-ab", NULL }; - optind = OPTIND_MIN; - opterr = 0; - if (getopt (2, argv, "ab:") != 'a') - return 13; - if (getopt (2, argv, "ab:") != '?') - return 14; - if (optopt != 'b') - return 15; - if (optind != 2) - return 16; - } - - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getopt_posix=yes -else - gl_cv_func_getopt_posix=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - CPPFLAGS=$gl_save_CPPFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 -$as_echo "$gl_cv_func_getopt_posix" >&6; } - case "$gl_cv_func_getopt_posix" in - *no) gl_replace_getopt=yes ;; - esac - fi - - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 -$as_echo_n "checking for working GNU getopt function... " >&6; } -if ${gl_cv_func_getopt_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the - # optstring is necessary for programs like m4 that have POSIX-mandated - # semantics for supporting options interspersed with files. - # Also, since getopt_long is a GNU extension, we require optind=0. - # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; - # so take care to revert to the correct (non-)export state. - gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' - case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include - -int -main () -{ - - int result = 0; - /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, - and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, - OSF/1 5.1, Solaris 10. */ - { - char *myargv[3]; - myargv[0] = "conftest"; - myargv[1] = "-+"; - myargv[2] = 0; - opterr = 0; - if (getopt (2, myargv, "+a") != '?') - result |= 1; - } - /* This code succeeds on glibc 2.8, mingw, - and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, - IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ - { - char *argv[] = { "program", "-p", "foo", "bar", NULL }; - - optind = 1; - if (getopt (4, argv, "p::") != 'p') - result |= 2; - else if (optarg != NULL) - result |= 4; - else if (getopt (4, argv, "p::") != -1) - result |= 6; - else if (optind != 2) - result |= 8; - } - /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ - { - char *argv[] = { "program", "foo", "-p", NULL }; - optind = 0; - if (getopt (3, argv, "-p") != 1) - result |= 16; - else if (getopt (3, argv, "-p") != 'p') - result |= 32; - } - /* This code fails on glibc 2.11. */ - { - char *argv[] = { "program", "-b", "-a", NULL }; - optind = opterr = 0; - if (getopt (3, argv, "+:a:b") != 'b') - result |= 64; - else if (getopt (3, argv, "+:a:b") != ':') - result |= 64; - } - return result; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getopt_gnu=yes -else - gl_cv_func_getopt_gnu=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - case $gl_had_POSIXLY_CORRECT in - exported) ;; - yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; - *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; - esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 -$as_echo "$gl_cv_func_getopt_gnu" >&6; } - if test "$gl_cv_func_getopt_gnu" = "no"; then - gl_replace_getopt=yes - fi - fi - -ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" -if test "x$ac_cv_have_decl_getenv" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETENV $ac_have_decl -_ACEOF - - - - - - - if test -n "$gl_replace_getopt"; then : - - - - GETOPT_H=getopt.h - -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - - - GNULIB_UNISTD_H_GETOPT=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" - - - - - - -fi - - - - GNULIB_FCHMODAT=0; - GNULIB_FSTATAT=0; - GNULIB_FUTIMENS=0; - GNULIB_LCHMOD=0; - GNULIB_LSTAT=0; - GNULIB_MKDIRAT=0; - GNULIB_MKFIFO=0; - GNULIB_MKFIFOAT=0; - GNULIB_MKNOD=0; - GNULIB_MKNODAT=0; - GNULIB_STAT=0; - GNULIB_UTIMENSAT=0; - HAVE_FCHMODAT=1; - HAVE_FSTATAT=1; - HAVE_FUTIMENS=1; - HAVE_LCHMOD=1; - HAVE_LSTAT=1; - HAVE_MKDIRAT=1; - HAVE_MKFIFO=1; - HAVE_MKFIFOAT=1; - HAVE_MKNOD=1; - HAVE_MKNODAT=1; - HAVE_UTIMENSAT=1; - REPLACE_FSTAT=0; - REPLACE_FSTATAT=0; - REPLACE_FUTIMENS=0; - REPLACE_LSTAT=0; - REPLACE_MKDIR=0; - REPLACE_MKFIFO=0; - REPLACE_MKNOD=0; - REPLACE_STAT=0; - REPLACE_UTIMENSAT=0; - - - - - for ac_func in $ac_func_list -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } -if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f conftest.sym conftest.file - echo >conftest.file - if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then : - # When cross-compiling, be pessimistic so we will end up using the - # replacement version of lstat that checks for trailing slashes and - # calls lstat a second time when necessary. - ac_cv_func_lstat_dereferences_slashed_symlink=no - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by - POSIX. That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_lstat_dereferences_slashed_symlink=yes -else - ac_cv_func_lstat_dereferences_slashed_symlink=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - else - # If the 'ln -s' command failed, then we probably don't even - # have an lstat function. - ac_cv_func_lstat_dereferences_slashed_symlink=no - fi - rm -f conftest.sym conftest.file - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } - test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && - -cat >>confdefs.h <<_ACEOF -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 -_ACEOF - - if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" - - fi - - - GNULIB_MKTIME=0; - GNULIB_NANOSLEEP=0; - GNULIB_STRPTIME=0; - GNULIB_TIMEGM=0; - GNULIB_TIME_R=0; - HAVE_DECL_LOCALTIME_R=1; - HAVE_NANOSLEEP=1; - HAVE_STRPTIME=1; - HAVE_TIMEGM=1; - REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; - REPLACE_MKTIME=GNULIB_PORTCHECK; - REPLACE_NANOSLEEP=GNULIB_PORTCHECK; - REPLACE_TIMEGM=GNULIB_PORTCHECK; - - - - - gl_cv_c_multiarch=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $gl_cv_c_multiarch = yes; then - APPLE_UNIVERSAL_BUILD=1 - else - APPLE_UNIVERSAL_BUILD=0 - fi - - - - - - - - if test $ac_cv_header_sys_socket_h = no; then - for ac_header in ws2tcpip.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" -if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WS2TCPIP_H 1 -_ACEOF - -fi - -done - - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if ${ac_cv_header_stdbool_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; - -int -main () -{ - - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdbool_h=yes -else - ac_cv_header_stdbool_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 -$as_echo "$ac_cv_header_stdbool_h" >&6; } - ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 -_ACEOF - - -fi - - - - REPLACE_NULL=0; - HAVE_WCHAR_T=1; - STDDEF_H=''; - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 -$as_echo_n "checking for wchar_t... " >&6; } -if ${gt_cv_c_wchar_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - wchar_t foo = (wchar_t)'\0'; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wchar_t=yes -else - gt_cv_c_wchar_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 -$as_echo "$gt_cv_c_wchar_t" >&6; } - if test $gt_cv_c_wchar_t = yes; then - -$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h - - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 -$as_echo_n "checking for unsigned long long int... " >&6; } -if ${ac_cv_type_unsigned_long_long_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - ac_cv_type_unsigned_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 -$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } - if test $ac_cv_type_unsigned_long_long_int = yes; then - -$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h - - fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 -$as_echo_n "checking for long long int... " >&6; } -if ${ac_cv_type_long_long_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif -int -main () -{ -long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_type_long_long_int=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 -$as_echo "$ac_cv_type_long_long_int" >&6; } - if test $ac_cv_type_long_long_int = yes; then - -$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h - - fi - - - - - - - GNULIB_DPRINTF=0; - GNULIB_FCLOSE=0; - GNULIB_FFLUSH=0; - GNULIB_FOPEN=0; - GNULIB_FPRINTF=0; - GNULIB_FPRINTF_POSIX=0; - GNULIB_FPURGE=0; - GNULIB_FPUTC=0; - GNULIB_FPUTS=0; - GNULIB_FREOPEN=0; - GNULIB_FSEEK=0; - GNULIB_FSEEKO=0; - GNULIB_FTELL=0; - GNULIB_FTELLO=0; - GNULIB_FWRITE=0; - GNULIB_GETDELIM=0; - GNULIB_GETLINE=0; - GNULIB_OBSTACK_PRINTF=0; - GNULIB_OBSTACK_PRINTF_POSIX=0; - GNULIB_PERROR=0; - GNULIB_POPEN=0; - GNULIB_PRINTF=0; - GNULIB_PRINTF_POSIX=0; - GNULIB_PUTC=0; - GNULIB_PUTCHAR=0; - GNULIB_PUTS=0; - GNULIB_REMOVE=0; - GNULIB_RENAME=0; - GNULIB_RENAMEAT=0; - GNULIB_SNPRINTF=0; - GNULIB_SPRINTF_POSIX=0; - GNULIB_STDIO_H_SIGPIPE=0; - GNULIB_TMPFILE=0; - GNULIB_VASPRINTF=0; - GNULIB_VDPRINTF=0; - GNULIB_VFPRINTF=0; - GNULIB_VFPRINTF_POSIX=0; - GNULIB_VPRINTF=0; - GNULIB_VPRINTF_POSIX=0; - GNULIB_VSNPRINTF=0; - GNULIB_VSPRINTF_POSIX=0; - HAVE_DECL_FPURGE=1; - HAVE_DECL_FSEEKO=1; - HAVE_DECL_FTELLO=1; - HAVE_DECL_GETDELIM=1; - HAVE_DECL_GETLINE=1; - HAVE_DECL_OBSTACK_PRINTF=1; - HAVE_DECL_SNPRINTF=1; - HAVE_DECL_VSNPRINTF=1; - HAVE_DPRINTF=1; - HAVE_FSEEKO=1; - HAVE_FTELLO=1; - HAVE_RENAMEAT=1; - HAVE_VASPRINTF=1; - HAVE_VDPRINTF=1; - REPLACE_DPRINTF=0; - REPLACE_FCLOSE=0; - REPLACE_FFLUSH=0; - REPLACE_FOPEN=0; - REPLACE_FPRINTF=0; - REPLACE_FPURGE=0; - REPLACE_FREOPEN=0; - REPLACE_FSEEK=0; - REPLACE_FSEEKO=0; - REPLACE_FTELL=0; - REPLACE_FTELLO=0; - REPLACE_GETDELIM=0; - REPLACE_GETLINE=0; - REPLACE_OBSTACK_PRINTF=0; - REPLACE_PERROR=0; - REPLACE_POPEN=0; - REPLACE_PRINTF=0; - REPLACE_REMOVE=0; - REPLACE_RENAME=0; - REPLACE_RENAMEAT=0; - REPLACE_SNPRINTF=0; - REPLACE_SPRINTF=0; - REPLACE_STDIO_WRITE_FUNCS=0; - REPLACE_TMPFILE=0; - REPLACE_VASPRINTF=0; - REPLACE_VDPRINTF=0; - REPLACE_VFPRINTF=0; - REPLACE_VPRINTF=0; - REPLACE_VSNPRINTF=0; - REPLACE_VSPRINTF=0; - - - ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include -" -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : - -$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h - -fi - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 -$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if ${ac_cv_header_stat_broken+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -#if defined S_ISBLK && defined S_IFDIR -extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; -#endif - -#if defined S_ISBLK && defined S_IFCHR -extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; -#endif - -#if defined S_ISLNK && defined S_IFREG -extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; -#endif - -#if defined S_ISSOCK && defined S_IFREG -extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stat_broken=no -else - ac_cv_header_stat_broken=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 -$as_echo "$ac_cv_header_stat_broken" >&6; } -if test $ac_cv_header_stat_broken = yes; then - -$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h - -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -$as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if ${ac_cv_c_restrict+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } -int -main () -{ -int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_restrict=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -$as_echo "$ac_cv_c_restrict" >&6; } - - case $ac_cv_c_restrict in - restrict) ;; - no) $as_echo "#define restrict /**/" >>confdefs.h - ;; - *) cat >>confdefs.h <<_ACEOF -#define restrict $ac_cv_c_restrict -_ACEOF - ;; - esac - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -$as_echo_n "checking for struct timespec in ... " >&6; } -if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -static struct timespec x; x.tv_sec = x.tv_nsec; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timespec_in_time_h=yes -else - gl_cv_sys_struct_timespec_in_time_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 -$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } - - TIME_H_DEFINES_STRUCT_TIMESPEC=0 - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 - if test $gl_cv_sys_struct_timespec_in_time_h = yes; then - TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -$as_echo_n "checking for struct timespec in ... " >&6; } -if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -static struct timespec x; x.tv_sec = x.tv_nsec; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timespec_in_sys_time_h=yes -else - gl_cv_sys_struct_timespec_in_sys_time_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 -$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } - if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -$as_echo_n "checking for struct timespec in ... " >&6; } -if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -static struct timespec x; x.tv_sec = x.tv_nsec; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timespec_in_pthread_h=yes -else - gl_cv_sys_struct_timespec_in_pthread_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 -$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } - if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 - fi - fi - fi - - - - - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_time_h='<'time.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_time_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/time.h#{ - s#.*"\(.*/time.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 -$as_echo "$gl_cv_next_time_h" >&6; } - fi - NEXT_TIME_H=$gl_cv_next_time_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'time.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_time_h - fi - NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive - - - - - - -ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" -if test "x$ac_cv_have_decl_localtime_r" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_LOCALTIME_R $ac_have_decl -_ACEOF - - - - - if false; then - GL_COND_LIBTOOL_TRUE= - GL_COND_LIBTOOL_FALSE='#' -else - GL_COND_LIBTOOL_TRUE='#' - GL_COND_LIBTOOL_FALSE= -fi - - gl_cond_libtool=false - gl_libdeps= - gl_ltlibdeps= - gl_m4_base='m4' - - - - - - - - - - gl_source_base='lib' - # Code from module arg-nonnull: - # Code from module c++defs: - # Code from module crypto/md5: - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS md5.$ac_objext" - - - - - : - - # Code from module dosname: - # Code from module dtoastr: - - # Code from module extensions: - # Code from module filemode: - - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS filemode.$ac_objext" - - - - # Code from module getloadavg: - - -# Persuade glibc to declare getloadavg(). - - -# Make sure getloadavg.c is where it belongs, at configure-time. -test -f "$srcdir/$gl_source_base/getloadavg.c" || - as_fn_error $? "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5 - -gl_save_LIBS=$LIBS - -# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, -# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. -ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" -if test "x$ac_cv_func_getloadavg" = xyes; then : - -else - gl_have_func=no - - # Some systems with -lutil have (and need) -lkvm as well, some do not. - # On Solaris, -lkvm requires nlist from -lelf, so check that first - # to get the right answer into the cache. - # For kstat on solaris, we need to test for libelf and libkvm to force the - # definition of SVR4 below. - if test $gl_have_func = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 -$as_echo_n "checking for elf_begin in -lelf... " >&6; } -if ${ac_cv_lib_elf_elf_begin+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lelf $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char elf_begin (); -int -main () -{ -return elf_begin (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_elf_elf_begin=yes -else - ac_cv_lib_elf_elf_begin=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 -$as_echo "$ac_cv_lib_elf_elf_begin" >&6; } -if test "x$ac_cv_lib_elf_elf_begin" = xyes; then : - LIBS="-lelf $LIBS" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 -$as_echo_n "checking for kvm_open in -lkvm... " >&6; } -if ${ac_cv_lib_kvm_kvm_open+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkvm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char kvm_open (); -int -main () -{ -return kvm_open (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_kvm_kvm_open=yes -else - ac_cv_lib_kvm_kvm_open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 -$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } -if test "x$ac_cv_lib_kvm_kvm_open" = xyes; then : - LIBS="-lkvm $LIBS" -fi - - # Check for the 4.4BSD definition of getloadavg. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 -$as_echo_n "checking for getloadavg in -lutil... " >&6; } -if ${ac_cv_lib_util_getloadavg+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lutil $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getloadavg (); -int -main () -{ -return getloadavg (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_util_getloadavg=yes -else - ac_cv_lib_util_getloadavg=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 -$as_echo "$ac_cv_lib_util_getloadavg" >&6; } -if test "x$ac_cv_lib_util_getloadavg" = xyes; then : - LIBS="-lutil $LIBS" gl_have_func=yes -fi - - fi - - if test $gl_have_func = no; then - # There is a commonly available library for RS/6000 AIX. - # Since it is not a standard part of AIX, it might be installed locally. - gl_getloadavg_LIBS=$LIBS - LIBS="-L/usr/local/lib $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 -$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } -if ${ac_cv_lib_getloadavg_getloadavg+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgetloadavg $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getloadavg (); -int -main () -{ -return getloadavg (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_getloadavg_getloadavg=yes -else - ac_cv_lib_getloadavg_getloadavg=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 -$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } -if test "x$ac_cv_lib_getloadavg_getloadavg" = xyes; then : - LIBS="-lgetloadavg $LIBS" gl_have_func=yes -else - LIBS=$gl_getloadavg_LIBS -fi - - fi - - # Set up the replacement function if necessary. - if test $gl_have_func = no; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext" - - -# Figure out what our getloadavg.c needs. - -# Solaris has libkstat which does not require root. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 -$as_echo_n "checking for kstat_open in -lkstat... " >&6; } -if ${ac_cv_lib_kstat_kstat_open+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkstat $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char kstat_open (); -int -main () -{ -return kstat_open (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_kstat_kstat_open=yes -else - ac_cv_lib_kstat_kstat_open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 -$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } -if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBKSTAT 1 -_ACEOF - - LIBS="-lkstat $LIBS" - -fi - -test $ac_cv_lib_kstat_kstat_open = yes && gl_have_func=yes - -# On HPUX9, an unprivileged user can get load averages this way. -if test $gl_have_func = no; then - for ac_func in pstat_getdynamic -do : - ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" -if test "x$ac_cv_func_pstat_getdynamic" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PSTAT_GETDYNAMIC 1 -_ACEOF - gl_have_func=yes -fi -done - -fi - -# AIX has libperfstat which does not require root -if test $gl_have_func = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5 -$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; } -if ${ac_cv_lib_perfstat_perfstat_cpu_total+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lperfstat $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char perfstat_cpu_total (); -int -main () -{ -return perfstat_cpu_total (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_perfstat_perfstat_cpu_total=yes -else - ac_cv_lib_perfstat_perfstat_cpu_total=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 -$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } -if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPERFSTAT 1 -_ACEOF - - LIBS="-lperfstat $LIBS" - -fi - - test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_have_func=yes -fi - -if test $gl_have_func = no; then - ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_dg_sys_info_h" = xyes; then : - gl_have_func=yes - -$as_echo "#define DGUX 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 -$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } -if ${ac_cv_lib_dgc_dg_sys_info+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldgc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dg_sys_info (); -int -main () -{ -return dg_sys_info (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dgc_dg_sys_info=yes -else - ac_cv_lib_dgc_dg_sys_info=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 -$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } -if test "x$ac_cv_lib_dgc_dg_sys_info" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDGC 1 -_ACEOF - - LIBS="-ldgc $LIBS" - -fi - -fi - - -fi - -# We cannot check for , because Solaris 2 does not use dwarf (it -# uses stabs), but it is still SVR4. We cannot check for because -# Irix 4.0.5F has the header but not the library. -if test $gl_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes \ - && test "$ac_cv_lib_kvm_kvm_open" = yes; then - gl_have_func=yes - -$as_echo "#define SVR4 1" >>confdefs.h - -fi - -if test $gl_have_func = no; then - ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" -if test "x$ac_cv_header_inq_stats_cpustats_h" = xyes; then : - gl_have_func=yes - -$as_echo "#define UMAX 1" >>confdefs.h - - -$as_echo "#define UMAX4_3 1" >>confdefs.h - -fi - - -fi - -if test $gl_have_func = no; then - ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_cpustats_h" = xyes; then : - gl_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h - -fi - - -fi - -if test $gl_have_func = no; then - for ac_header in mach/mach.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_mach_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MACH_MACH_H 1 -_ACEOF - -fi - -done - -fi - -for ac_header in nlist.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" -if test "x$ac_cv_header_nlist_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NLIST_H 1 -_ACEOF - ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include -" -if test "x$ac_cv_member_struct_nlist_n_un_n_name" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 -_ACEOF - - -fi - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct nlist x; - #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME - x.n_un.n_name = ""; - #else - x.n_name = ""; - #endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -$as_echo "#define N_NAME_POINTER 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - -done - - fi -fi - - -if test "x$gl_save_LIBS" = x; then - GETLOADAVG_LIBS=$LIBS -else - GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"` -fi -LIBS=$gl_save_LIBS - - -# Test whether the system declares getloadavg. Solaris has the function -# but declares it in , not . -for ac_header in sys/loadavg.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_loadavg_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_LOADAVG_H 1 -_ACEOF - -fi - -done - -if test $ac_cv_header_sys_loadavg_h = yes; then - HAVE_SYS_LOADAVG_H=1 -else - HAVE_SYS_LOADAVG_H=0 -fi -ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H - # include - #endif - #include -" -if test "x$ac_cv_have_decl_getloadavg" = xyes; then : - -else - HAVE_DECL_GETLOADAVG=0 -fi - - - - - - GNULIB_GETLOADAVG=1 - - - - # Code from module getopt-gnu: - - - - - - - # Code from module getopt-posix: - - - - - - if test -n "$gl_replace_getopt"; then : - - - - GETOPT_H=getopt.h - -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - - - GNULIB_UNISTD_H_GETOPT=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" - - - - - - -fi - - - # Code from module gettext-h: - - - # Code from module ignore-value: - - # Code from module include_next: - # Code from module intprops: - # Code from module lstat: - - - - if test $ac_cv_func_lstat = yes; then - - if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then - REPLACE_LSTAT=1 - fi - # Prerequisites of lib/lstat.c. - - else - HAVE_LSTAT=0 - fi - - - - - GNULIB_LSTAT=1 - - - - # Code from module mktime: - - - - - -if test $APPLE_UNIVERSAL_BUILD = 1; then - # A universal build on Apple MacOS X platforms. - # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. - # But we need a configuration result that is valid in both modes. - ac_cv_func_working_mktime=no -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 -$as_echo_n "checking for working mktime... " >&6; } -if ${ac_cv_func_working_mktime+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_working_mktime=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Test program from Paul Eggert and Tony Leneis. */ -#include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifndef HAVE_ALARM -# define alarm(X) /* empty */ -#endif - -/* Work around redefinition to rpl_putenv by other config tests. */ -#undef putenv - -static time_t time_t_max; -static time_t time_t_min; - -/* Values we'll use to set the TZ environment variable. */ -static char *tz_strings[] = { - (char *) 0, "TZ=GMT0", "TZ=JST-9", - "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" -}; -#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) - -/* Return 0 if mktime fails to convert a date in the spring-forward gap. - Based on a problem report from Andreas Jaeger. */ -static int -spring_forward_gap () -{ - /* glibc (up to about 1998-10-07) failed this test. */ - struct tm tm; - - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - - tm.tm_year = 98; - tm.tm_mon = 3; - tm.tm_mday = 5; - tm.tm_hour = 2; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - return mktime (&tm) != (time_t) -1; -} - -static int -mktime_test1 (time_t now) -{ - struct tm *lt; - return ! (lt = localtime (&now)) || mktime (lt) == now; -} - -static int -mktime_test (time_t now) -{ - return (mktime_test1 (now) - && mktime_test1 ((time_t) (time_t_max - now)) - && mktime_test1 ((time_t) (time_t_min + now))); -} - -static int -irix_6_4_bug () -{ - /* Based on code from Ariel Faigon. */ - struct tm tm; - tm.tm_year = 96; - tm.tm_mon = 3; - tm.tm_mday = 0; - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - mktime (&tm); - return tm.tm_mon == 2 && tm.tm_mday == 31; -} - -static int -bigtime_test (int j) -{ - struct tm tm; - time_t now; - tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; - now = mktime (&tm); - if (now != (time_t) -1) - { - struct tm *lt = localtime (&now); - if (! (lt - && lt->tm_year == tm.tm_year - && lt->tm_mon == tm.tm_mon - && lt->tm_mday == tm.tm_mday - && lt->tm_hour == tm.tm_hour - && lt->tm_min == tm.tm_min - && lt->tm_sec == tm.tm_sec - && lt->tm_yday == tm.tm_yday - && lt->tm_wday == tm.tm_wday - && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) - == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) - return 0; - } - return 1; -} - -static int -year_2050_test () -{ - /* The correct answer for 2050-02-01 00:00:00 in Pacific time, - ignoring leap seconds. */ - unsigned long int answer = 2527315200UL; - - struct tm tm; - time_t t; - tm.tm_year = 2050 - 1900; - tm.tm_mon = 2 - 1; - tm.tm_mday = 1; - tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - tm.tm_isdst = -1; - - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - - t = mktime (&tm); - - /* Check that the result is either a failure, or close enough - to the correct answer that we can assume the discrepancy is - due to leap seconds. */ - return (t == (time_t) -1 - || (0 < t && answer - 120 <= t && t <= answer + 120)); -} - -int -main () -{ - int result = 0; - time_t t, delta; - int i, j; - int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; - int time_t_signed = ! ((time_t) 0 < (time_t) -1); - - /* This test makes some buggy mktime implementations loop. - Give up after 60 seconds; a mktime slower than that - isn't worth using anyway. */ - alarm (60); - - time_t_max = (! time_t_signed - ? (time_t) -1 - : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) - * 2 + 1)); - time_t_min = (! time_t_signed - ? (time_t) 0 - : time_t_signed_magnitude - ? ~ (time_t) 0 - : ~ time_t_max); - - delta = time_t_max / 997; /* a suitable prime number */ - for (i = 0; i < N_STRINGS; i++) - { - if (tz_strings[i]) - putenv (tz_strings[i]); - - for (t = 0; t <= time_t_max - delta; t += delta) - if (! mktime_test (t)) - result |= 1; - if (! (mktime_test ((time_t) 1) - && mktime_test ((time_t) (60 * 60)) - && mktime_test ((time_t) (60 * 60 * 24)))) - result |= 2; - - for (j = 1; ; j <<= 1) - if (! bigtime_test (j)) - result |= 4; - else if (INT_MAX / 2 < j) - break; - if (! bigtime_test (INT_MAX)) - result |= 8; - } - if (! irix_6_4_bug ()) - result |= 16; - if (! spring_forward_gap ()) - result |= 32; - if (! year_2050_test ()) - result |= 64; - return result; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_working_mktime=yes -else - ac_cv_func_working_mktime=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 -$as_echo "$ac_cv_func_working_mktime" >&6; } -if test $ac_cv_func_working_mktime = no; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" - -fi - - if test $ac_cv_func_working_mktime = no; then - REPLACE_MKTIME=1 - - - - else - REPLACE_MKTIME=0 - fi - - - - - GNULIB_MKTIME=1 - - - - # Code from module multiarch: - - # Code from module readlink: - - - - if test $ac_cv_func_readlink = no; then - HAVE_READLINK=0 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" - - - : - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 -$as_echo_n "checking whether readlink signature is correct... " >&6; } -if ${gl_cv_decl_readlink_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Cause compilation failure if original declaration has wrong type. */ - ssize_t readlink (const char *, char *, size_t); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_decl_readlink_works=yes -else - gl_cv_decl_readlink_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 -$as_echo "$gl_cv_decl_readlink_works" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 -$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } -if ${gl_cv_func_readlink_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - # We have readlink, so assume ln -s works. - ln -s conftest.no-such conftest.link - ln -s conftest.link conftest.lnk2 - if test "$cross_compiling" = yes; then : - gl_cv_func_readlink_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -char buf[20]; - return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_readlink_works=yes -else - gl_cv_func_readlink_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - rm -f conftest.link conftest.lnk2 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 -$as_echo "$gl_cv_func_readlink_works" >&6; } - if test "$gl_cv_func_readlink_works" != yes; then - -$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h - - REPLACE_READLINK=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" - - elif test "$gl_cv_decl_readlink_works" != yes; then - REPLACE_READLINK=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" - - fi - fi - - - - - GNULIB_READLINK=1 - - - - # Code from module socklen: - ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " -/* is not needed according to POSIX, but the - in i386-unknown-freebsd4.10 and - powerpc-apple-darwin5.5 required it. */ -#include -#if HAVE_SYS_SOCKET_H -# include -#elif HAVE_WS2TCPIP_H -# include -#endif - -" -if test "x$ac_cv_type_socklen_t" = xyes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 -$as_echo_n "checking for socklen_t equivalent... " >&6; } - if ${gl_cv_socklen_t_equiv+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Systems have either "struct sockaddr *" or - # "void *" as the second argument to getpeername - gl_cv_socklen_t_equiv= - for arg2 in "struct sockaddr" void; do - for t in int size_t "unsigned int" "long int" "unsigned long int"; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - - int getpeername (int, $arg2 *, $t *); -int -main () -{ -$t len; - getpeername (0, 0, &len); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_socklen_t_equiv="$t" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$gl_cv_socklen_t_equiv" != "" && break - done - test "$gl_cv_socklen_t_equiv" != "" && break - done - -fi - - if test "$gl_cv_socklen_t_equiv" = ""; then - as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 -$as_echo "$gl_cv_socklen_t_equiv" >&6; } - -cat >>confdefs.h <<_ACEOF -#define socklen_t $gl_cv_socklen_t_equiv -_ACEOF - -fi - - # Code from module stat: - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 -$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } -if ${gl_cv_func_stat_dir_slash+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - case $host_os in - mingw*) gl_cv_func_stat_dir_slash="guessing no";; - *) gl_cv_func_stat_dir_slash="guessing yes";; - esac -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -struct stat st; return stat (".", &st) != stat ("./", &st); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_stat_dir_slash=yes -else - gl_cv_func_stat_dir_slash=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 -$as_echo "$gl_cv_func_stat_dir_slash" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 -$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } -if ${gl_cv_func_stat_file_slash+:} false; then : - $as_echo_n "(cached) " >&6 -else - touch conftest.tmp - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.tmp conftest.lnk - fi - if test "$cross_compiling" = yes; then : - gl_cv_func_stat_file_slash="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -int result = 0; - struct stat st; - if (!stat ("conftest.tmp/", &st)) - result |= 1; -#if HAVE_LSTAT - if (!stat ("conftest.lnk/", &st)) - result |= 2; -#endif - return result; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_stat_file_slash=yes -else - gl_cv_func_stat_file_slash=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - rm -f conftest.tmp conftest.lnk -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 -$as_echo "$gl_cv_func_stat_file_slash" >&6; } - case $gl_cv_func_stat_dir_slash in - *no) REPLACE_STAT=1 - -$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h -;; - esac - case $gl_cv_func_stat_file_slash in - *no) REPLACE_STAT=1 - -$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h -;; - esac - if test $REPLACE_STAT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" - - - fi - - - - - GNULIB_STAT=1 - - - - # Code from module stdbool: - - - - # Define two additional variables used in the Makefile substitution. - - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' - else - STDBOOL_H='stdbool.h' - fi - - - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi - - - # Code from module stddef: - - - - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 -$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } -if ${gl_cv_decl_null_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_decl_null_works=yes -else - gl_cv_decl_null_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 -$as_echo "$gl_cv_decl_null_works" >&6; } - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h - fi - if test -n "$STDDEF_H"; then - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stddef_h='<'stddef.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_stddef_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stddef.h#{ - s#.*"\(.*/stddef.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 -$as_echo "$gl_cv_next_stddef_h" >&6; } - fi - NEXT_STDDEF_H=$gl_cv_next_stddef_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stddef.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stddef_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive - - - - - fi - - # Code from module stdint: - - - - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi - - - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi - - - - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi - - - if test $ac_cv_header_inttypes_h = yes; then - HAVE_INTTYPES_H=1 - else - HAVE_INTTYPES_H=0 - fi - - - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 - else - HAVE_SYS_TYPES_H=0 - fi - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdint_h='<'stdint.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_stdint_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_stdint_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdint.h#{ - s#.*"\(.*/stdint.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_stdint_h='<'stdint.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 -$as_echo "$gl_cv_next_stdint_h" >&6; } - fi - NEXT_STDINT_H=$gl_cv_next_stdint_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdint.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdint_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_stdint_h = yes; then - HAVE_STDINT_H=1 - else - HAVE_STDINT_H=0 - fi - - - if test $ac_cv_header_stdint_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 -$as_echo_n "checking whether stdint.h conforms to C99... " >&6; } -if ${gl_cv_header_working_stdint_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - gl_cv_header_working_stdint_h=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include -/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ -#if !(defined WCHAR_MIN && defined WCHAR_MAX) -#error "WCHAR_MIN, WCHAR_MAX not defined in " -#endif - - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - -#ifdef INT8_MAX -int8_t a1 = INT8_MAX; -int8_t a1min = INT8_MIN; -#endif -#ifdef INT16_MAX -int16_t a2 = INT16_MAX; -int16_t a2min = INT16_MIN; -#endif -#ifdef INT32_MAX -int32_t a3 = INT32_MAX; -int32_t a3min = INT32_MIN; -#endif -#ifdef INT64_MAX -int64_t a4 = INT64_MAX; -int64_t a4min = INT64_MIN; -#endif -#ifdef UINT8_MAX -uint8_t b1 = UINT8_MAX; -#else -typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; -#endif -#ifdef UINT16_MAX -uint16_t b2 = UINT16_MAX; -#endif -#ifdef UINT32_MAX -uint32_t b3 = UINT32_MAX; -#endif -#ifdef UINT64_MAX -uint64_t b4 = UINT64_MAX; -#endif -int_least8_t c1 = INT8_C (0x7f); -int_least8_t c1max = INT_LEAST8_MAX; -int_least8_t c1min = INT_LEAST8_MIN; -int_least16_t c2 = INT16_C (0x7fff); -int_least16_t c2max = INT_LEAST16_MAX; -int_least16_t c2min = INT_LEAST16_MIN; -int_least32_t c3 = INT32_C (0x7fffffff); -int_least32_t c3max = INT_LEAST32_MAX; -int_least32_t c3min = INT_LEAST32_MIN; -int_least64_t c4 = INT64_C (0x7fffffffffffffff); -int_least64_t c4max = INT_LEAST64_MAX; -int_least64_t c4min = INT_LEAST64_MIN; -uint_least8_t d1 = UINT8_C (0xff); -uint_least8_t d1max = UINT_LEAST8_MAX; -uint_least16_t d2 = UINT16_C (0xffff); -uint_least16_t d2max = UINT_LEAST16_MAX; -uint_least32_t d3 = UINT32_C (0xffffffff); -uint_least32_t d3max = UINT_LEAST32_MAX; -uint_least64_t d4 = UINT64_C (0xffffffffffffffff); -uint_least64_t d4max = UINT_LEAST64_MAX; -int_fast8_t e1 = INT_FAST8_MAX; -int_fast8_t e1min = INT_FAST8_MIN; -int_fast16_t e2 = INT_FAST16_MAX; -int_fast16_t e2min = INT_FAST16_MIN; -int_fast32_t e3 = INT_FAST32_MAX; -int_fast32_t e3min = INT_FAST32_MIN; -int_fast64_t e4 = INT_FAST64_MAX; -int_fast64_t e4min = INT_FAST64_MIN; -uint_fast8_t f1 = UINT_FAST8_MAX; -uint_fast16_t f2 = UINT_FAST16_MAX; -uint_fast32_t f3 = UINT_FAST32_MAX; -uint_fast64_t f4 = UINT_FAST64_MAX; -#ifdef INTPTR_MAX -intptr_t g = INTPTR_MAX; -intptr_t gmin = INTPTR_MIN; -#endif -#ifdef UINTPTR_MAX -uintptr_t h = UINTPTR_MAX; -#endif -intmax_t i = INTMAX_MAX; -uintmax_t j = UINTMAX_MAX; - -#include /* for CHAR_BIT */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) -struct s { - int check_PTRDIFF: - PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) - && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) - ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ - int check_SIG_ATOMIC: - SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) - && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) - ? 1 : -1; - int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; - int check_WCHAR: - WCHAR_MIN == TYPE_MINIMUM (wchar_t) - && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) - ? 1 : -1; - /* Detect bug in mingw. */ - int check_WINT: - WINT_MIN == TYPE_MINIMUM (wint_t) - && WINT_MAX == TYPE_MAXIMUM (wint_t) - ? 1 : -1; - - /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ - int check_UINT8_C: - (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; - int check_UINT16_C: - (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; - - /* Detect bugs in OpenBSD 3.9 stdint.h. */ -#ifdef UINT8_MAX - int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; -#endif -#ifdef UINT16_MAX - int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; -#endif -#ifdef UINT32_MAX - int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; -#endif -#ifdef UINT64_MAX - int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; -#endif - int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; - int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; - int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; - int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; - int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; - int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; - int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; - int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; - int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; - int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; - int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; -}; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if test "$cross_compiling" = yes; then : - gl_cv_header_working_stdint_h=yes - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include - - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - -#include -#include -#define MVAL(macro) MVAL1(macro) -#define MVAL1(expression) #expression -static const char *macro_values[] = - { -#ifdef INT8_MAX - MVAL (INT8_MAX), -#endif -#ifdef INT16_MAX - MVAL (INT16_MAX), -#endif -#ifdef INT32_MAX - MVAL (INT32_MAX), -#endif -#ifdef INT64_MAX - MVAL (INT64_MAX), -#endif -#ifdef UINT8_MAX - MVAL (UINT8_MAX), -#endif -#ifdef UINT16_MAX - MVAL (UINT16_MAX), -#endif -#ifdef UINT32_MAX - MVAL (UINT32_MAX), -#endif -#ifdef UINT64_MAX - MVAL (UINT64_MAX), -#endif - NULL - }; - -int -main () -{ - - const char **mv; - for (mv = macro_values; *mv != NULL; mv++) - { - const char *value = *mv; - /* Test whether it looks like a cast expression. */ - if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 - || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 - || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 - || strncmp (value, "((int)"/*)*/, 6) == 0 - || strncmp (value, "((signed short)"/*)*/, 15) == 0 - || strncmp (value, "((signed char)"/*)*/, 14) == 0) - return mv - macro_values + 1; - } - return 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_header_working_stdint_h=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 -$as_echo "$gl_cv_header_working_stdint_h" >&6; } - fi - if test "$gl_cv_header_working_stdint_h" = yes; then - STDINT_H= - else - for ac_header in sys/inttypes.h sys/bitypes.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - else - HAVE_SYS_INTTYPES_H=0 - fi - - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - else - HAVE_SYS_BITYPES_H=0 - fi - - - - - if test $APPLE_UNIVERSAL_BUILD = 0; then - - - for gltype in ptrdiff_t size_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 -$as_echo_n "checking for bit size of $gltype... " >&6; } -if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - -#include "; then : - -else - result=unknown -fi - - eval gl_cv_bitsizeof_${gltype}=\$result - -fi -eval ac_res=\$gl_cv_bitsizeof_${gltype} - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - cat >>confdefs.h <<_ACEOF -#define BITSIZEOF_${GLTYPE} $result -_ACEOF - - eval BITSIZEOF_${GLTYPE}=\$result - done - - - fi - - - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 -$as_echo_n "checking for bit size of $gltype... " >&6; } -if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - -#include "; then : - -else - result=unknown -fi - - eval gl_cv_bitsizeof_${gltype}=\$result - -fi -eval ac_res=\$gl_cv_bitsizeof_${gltype} - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - cat >>confdefs.h <<_ACEOF -#define BITSIZEOF_${GLTYPE} $result -_ACEOF - - eval BITSIZEOF_${GLTYPE}=\$result - done - - - - - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 -$as_echo_n "checking whether $gltype is signed... " >&6; } -if eval \${gl_cv_type_${gltype}_signed+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - result=yes -else - result=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval gl_cv_type_${gltype}_signed=\$result - -fi -eval ac_res=\$gl_cv_type_${gltype}_signed - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_type_${gltype}_signed - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - if test "$result" = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_SIGNED_${GLTYPE} 1 -_ACEOF - - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done - - - gl_cv_type_ptrdiff_t_signed=yes - gl_cv_type_size_t_signed=no - if test $APPLE_UNIVERSAL_BUILD = 0; then - - - for gltype in ptrdiff_t size_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 -$as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if eval \${gl_cv_type_${gltype}_suffix+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - extern $gltype foo; - extern $gltype1 foo; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval gl_cv_type_${gltype}_suffix=\$glsuf -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done -fi -eval ac_res=\$gl_cv_type_${gltype}_suffix - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - cat >>confdefs.h <<_ACEOF -#define ${GLTYPE}_SUFFIX $result -_ACEOF - - done - - - fi - - - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 -$as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if eval \${gl_cv_type_${gltype}_suffix+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - extern $gltype foo; - extern $gltype1 foo; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval gl_cv_type_${gltype}_suffix=\$glsuf -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done -fi -eval ac_res=\$gl_cv_type_${gltype}_suffix - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - cat >>confdefs.h <<_ACEOF -#define ${GLTYPE}_SUFFIX $result -_ACEOF - - done - - - - STDINT_H=stdint.h - fi - - - # Code from module stdio: - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdio_h='<'stdio.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_stdio_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdio.h#{ - s#.*"\(.*/stdio.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 -$as_echo "$gl_cv_next_stdio_h" >&6; } - fi - NEXT_STDIO_H=$gl_cv_next_stdio_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdio.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdio_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive - - - - - GNULIB_FPRINTF=1 - GNULIB_PRINTF=1 - GNULIB_VFPRINTF=1 - GNULIB_VPRINTF=1 - GNULIB_FPUTC=1 - GNULIB_PUTC=1 - GNULIB_PUTCHAR=1 - GNULIB_FPUTS=1 - GNULIB_PUTS=1 - GNULIB_FWRITE=1 - - - - - # Code from module stdlib: - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdlib_h='<'stdlib.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_stdlib_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdlib.h#{ - s#.*"\(.*/stdlib.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 -$as_echo "$gl_cv_next_stdlib_h" >&6; } - fi - NEXT_STDLIB_H=$gl_cv_next_stdlib_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdlib.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdlib_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive - - - - - - - - # Code from module strftime: - - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strftime.$ac_objext" - - - # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. - - - - - - - -$as_echo "#define my_strftime nstrftime" >>confdefs.h - - - - # Code from module symlink: - - - - if test $ac_cv_func_symlink = no; then - HAVE_SYMLINK=0 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 -$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } -if ${gl_cv_func_symlink_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_symlink_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -int result = 0; - if (!symlink ("a", "conftest.link/")) - result |= 1; - if (symlink ("conftest.f", "conftest.lnk2")) - result |= 2; - else if (!symlink ("a", "conftest.lnk2/")) - result |= 4; - return result; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_symlink_works=yes -else - gl_cv_func_symlink_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - rm -f conftest.f conftest.link conftest.lnk2 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 -$as_echo "$gl_cv_func_symlink_works" >&6; } - if test "$gl_cv_func_symlink_works" != yes; then - REPLACE_SYMLINK=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" - - fi - fi - - - - - GNULIB_SYMLINK=1 - - - - # Code from module sys_stat: - - - - - - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_stat_h='<'sys/stat.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_sys_stat_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_sys_stat_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/sys/stat.h#{ - s#.*"\(.*/sys/stat.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_sys_stat_h='<'sys/stat.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 -$as_echo "$gl_cv_next_sys_stat_h" >&6; } - fi - NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'sys/stat.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_stat_h - fi - NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive - - - - - - ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include - #include -" -if test "x$ac_cv_type_nlink_t" = xyes; then : - -else - -$as_echo "#define nlink_t int" >>confdefs.h - -fi - - - - - - # Code from module time: - - - - # Code from module time_r: - - - - - - - - if test $ac_cv_have_decl_localtime_r = no; then - HAVE_DECL_LOCALTIME_R=0 - fi - - - if test $ac_cv_func_localtime_r = yes; then - HAVE_LOCALTIME_R=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 -$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } -if ${gl_cv_time_r_posix+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -/* We don't need to append 'restrict's to the argument types, - even though the POSIX signature has the 'restrict's, - since C99 says they can't affect type compatibility. */ - struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; - if (ptr) return 0; - /* Check the return type is a pointer. - On HP-UX 10 it is 'int'. */ - *localtime_r (0, 0); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_time_r_posix=yes -else - gl_cv_time_r_posix=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 -$as_echo "$gl_cv_time_r_posix" >&6; } - if test $gl_cv_time_r_posix = yes; then - REPLACE_LOCALTIME_R=0 - else - REPLACE_LOCALTIME_R=1 - fi - else - HAVE_LOCALTIME_R=0 - fi - if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" - - - : - - fi - - - - - GNULIB_TIME_R=1 - - - - # Code from module unistd: - - - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_unistd_h='<'unistd.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_unistd_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_unistd_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/unistd.h#{ - s#.*"\(.*/unistd.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_unistd_h='<'unistd.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 -$as_echo "$gl_cv_next_unistd_h" >&6; } - fi - NEXT_UNISTD_H=$gl_cv_next_unistd_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'unistd.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_unistd_h - fi - NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_unistd_h = yes; then - HAVE_UNISTD_H=1 - else - HAVE_UNISTD_H=0 - fi - - - - - # Code from module warn-on-use: - # End of code from modules - - - - - - - - - - gltests_libdeps= - gltests_ltlibdeps= - - - - - - - - - - gl_source_base='tests' - gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS - - gl_module_indicator_condition=$gltests_WITNESS - - - - - - - - - - LIBGNU_LIBDEPS="$gl_libdeps" - - LIBGNU_LTLIBDEPS="$gl_ltlibdeps" - - - -# UNIX98 PTYs. -for ac_func in grantpt -do : - ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" -if test "x$ac_cv_func_grantpt" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GRANTPT 1 -_ACEOF - -fi -done - - -# PTY-related GNU extensions. -for ac_func in getpt -do : - ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" -if test "x$ac_cv_func_getpt" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPT 1 -_ACEOF - -fi -done - - -# Check this now, so that we will NOT find the above functions in ncurses. -# That is because we have not set up to link ncurses in lib-src. -# It's better to believe a function is not available -# than to expect to find it in ncurses. -# Also we need tputs and friends to be able to build at all. -have_tputs_et_al=true -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 -$as_echo_n "checking for library containing tputs... " >&6; } -if ${ac_cv_search_tputs+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tputs (); -int -main () -{ -return tputs (); - ; - return 0; -} -_ACEOF -for ac_lib in '' ncurses terminfo termcap; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_tputs=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_tputs+:} false; then : - break -fi -done -if ${ac_cv_search_tputs+:} false; then : - -else - ac_cv_search_tputs=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 -$as_echo "$ac_cv_search_tputs" >&6; } -ac_res=$ac_cv_search_tputs -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - have_tputs_et_al=false -fi - -if test "$have_tputs_et_al" != true; then - as_fn_error $? "I couldn't find termcap functions (tputs and friends). -Maybe some development libraries/packages are missing? Try installing -libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 -fi -# Must define this when any termcap library is found. - -$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h - -## FIXME This was the cpp logic, but I am not sure it is right. -## The above test has not necessarily found libncurses. -HAVE_LIBNCURSES=yes - -## Use terminfo instead of termcap? -## Note only system files NOT using terminfo are: -## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and -## darwin|gnu without ncurses. -TERMINFO=no -LIBS_TERMCAP= -case "$opsys" in - ## cygwin: Fewer environment variables to go wrong, more terminal types. - ## hpux10-20: Use the system provided termcap(3) library. - ## openbsd: David Mazieres says this - ## is necessary. Otherwise Emacs dumps core when run -nw. - aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; - - ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. - ## The ncurses library has been moved out of the System framework in - ## Mac OS X 10.2. So if configure detects it, set the command-line - ## option to use it. - darwin|gnu*) - ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) - if test "x$HAVE_LIBNCURSES" = "xyes"; then - TERMINFO=yes - LIBS_TERMCAP="-lncurses" - fi - ;; - - freebsd) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 -$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } - if ${emacs_cv_freebsd_terminfo+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if __FreeBSD_version < 400000 -fail; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_freebsd_terminfo=yes -else - emacs_cv_freebsd_terminfo=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 -$as_echo "$emacs_cv_freebsd_terminfo" >&6; } - - if test $emacs_cv_freebsd_terminfo = yes; then - TERMINFO=yes - LIBS_TERMCAP="-lncurses" - else - LIBS_TERMCAP="-ltermcap" - fi - ;; - - netbsd) - if test $ac_cv_search_tputs = -lterminfo; then - TERMINFO=yes - LIBS_TERMCAP="-lterminfo" - else - LIBS_TERMCAP="-ltermcap" - fi - ;; - -esac - -case "$opsys" in - ## hpux: Make sure we get select from libc rather than from libcurses - ## because libcurses on HPUX 10.10 has a broken version of select. - ## We used to use -lc -lcurses, but this may be cleaner. - hpux*) LIBS_TERMCAP="-ltermcap" ;; - - openbsd) LIBS_TERMCAP="-lncurses" ;; - - ## Must use system termcap, if we use any termcap. It does special things. - sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;; -esac - -TERMCAP_OBJ=tparam.o -if test $TERMINFO = yes; then - -$as_echo "#define TERMINFO 1" >>confdefs.h - - - ## Default used to be -ltermcap. Add a case above if need something else. - test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses" - - TERMCAP_OBJ=terminfo.o -fi - - - - -# Do we have res_init, for detecting changes in /etc/resolv.conf? -resolv=no -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -int -main () -{ -return res_init(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - have_res_init=yes -else - have_res_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$have_res_init" = no; then - OLIBS="$LIBS" - LIBS="$LIBS -lresolv" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 -$as_echo_n "checking for res_init with -lresolv... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -int -main () -{ -return res_init(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - have_res_init=yes -else - have_res_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 -$as_echo "$have_res_init" >&6; } - if test "$have_res_init" = yes ; then - resolv=yes - fi - LIBS="$OLIBS" -fi - -if test "$have_res_init" = yes; then - -$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h - -fi - -# Do we need the Hesiod library to provide the support routines? -LIBHESIOD= -if test "$with_hesiod" != no ; then - # Don't set $LIBS here -- see comments above. FIXME which comments? - ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" -if test "x$ac_cv_func_res_send" = xyes; then : - -else - ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" -if test "x$ac_cv_func___res_send" = xyes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 -$as_echo_n "checking for res_send in -lresolv... " >&6; } -if ${ac_cv_lib_resolv_res_send+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lresolv $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char res_send (); -int -main () -{ -return res_send (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_resolv_res_send=yes -else - ac_cv_lib_resolv_res_send=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 -$as_echo "$ac_cv_lib_resolv_res_send" >&6; } -if test "x$ac_cv_lib_resolv_res_send" = xyes; then : - resolv=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 -$as_echo_n "checking for __res_send in -lresolv... " >&6; } -if ${ac_cv_lib_resolv___res_send+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lresolv $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char __res_send (); -int -main () -{ -return __res_send (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_resolv___res_send=yes -else - ac_cv_lib_resolv___res_send=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 -$as_echo "$ac_cv_lib_resolv___res_send" >&6; } -if test "x$ac_cv_lib_resolv___res_send" = xyes; then : - resolv=yes -fi - -fi - -fi - -fi - - if test "$resolv" = yes ; then - RESOLVLIB=-lresolv - else - RESOLVLIB= - fi - ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" -if test "x$ac_cv_func_hes_getmailhost" = xyes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 -$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } -if ${ac_cv_lib_hesiod_hes_getmailhost+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lhesiod $RESOLVLIB $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char hes_getmailhost (); -int -main () -{ -return hes_getmailhost (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_hesiod_hes_getmailhost=yes -else - ac_cv_lib_hesiod_hes_getmailhost=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 -$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } -if test "x$ac_cv_lib_hesiod_hes_getmailhost" = xyes; then : - hesiod=yes -else - : -fi - -fi - - - if test x"$hesiod" = xyes; then - -$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h - - LIBHESIOD=-lhesiod - fi -fi - - -# Do we need libresolv (due to res_init or Hesiod)? -if test "$resolv" = yes ; then - -$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h - - LIBRESOLV=-lresolv -else - LIBRESOLV= -fi - - -# These tell us which Kerberos-related libraries to use. -COM_ERRLIB= -CRYPTOLIB= -KRB5LIB= -DESLIB= -KRB4LIB= - -if test "${with_kerberos}" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 -$as_echo_n "checking for com_err in -lcom_err... " >&6; } -if ${ac_cv_lib_com_err_com_err+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcom_err $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char com_err (); -int -main () -{ -return com_err (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_com_err_com_err=yes -else - ac_cv_lib_com_err_com_err=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 -$as_echo "$ac_cv_lib_com_err_com_err" >&6; } -if test "x$ac_cv_lib_com_err_com_err" = xyes; then : - have_com_err=yes -else - have_com_err=no -fi - - if test $have_com_err = yes; then - COM_ERRLIB=-lcom_err - LIBS="$COM_ERRLIB $LIBS" - -$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 -$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_mit_des_cbc_encrypt+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char mit_des_cbc_encrypt (); -int -main () -{ -return mit_des_cbc_encrypt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_mit_des_cbc_encrypt=yes -else - ac_cv_lib_crypto_mit_des_cbc_encrypt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 -$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = xyes; then : - have_crypto=yes -else - have_crypto=no -fi - - if test $have_crypto = yes; then - CRYPTOLIB=-lcrypto - LIBS="$CRYPTOLIB $LIBS" - -$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 -$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } -if ${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lk5crypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char mit_des_cbc_encrypt (); -int -main () -{ -return mit_des_cbc_encrypt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes -else - ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 -$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = xyes; then : - have_k5crypto=yes -else - have_k5crypto=no -fi - - if test $have_k5crypto = yes; then - CRYPTOLIB=-lk5crypto - LIBS="$CRYPTOLIB $LIBS" - -$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 -$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } -if ${ac_cv_lib_krb5_krb5_init_context+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb5 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char krb5_init_context (); -int -main () -{ -return krb5_init_context (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_krb5_krb5_init_context=yes -else - ac_cv_lib_krb5_krb5_init_context=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 -$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } -if test "x$ac_cv_lib_krb5_krb5_init_context" = xyes; then : - have_krb5=yes -else - have_krb5=no -fi - - if test $have_krb5=yes; then - KRB5LIB=-lkrb5 - LIBS="$KRB5LIB $LIBS" - -$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h - - fi - if test "${with_kerberos5}" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 -$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } -if ${ac_cv_lib_des425_des_cbc_encrypt+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldes425 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char des_cbc_encrypt (); -int -main () -{ -return des_cbc_encrypt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_des425_des_cbc_encrypt=yes -else - ac_cv_lib_des425_des_cbc_encrypt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 -$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_des425_des_cbc_encrypt" = xyes; then : - have_des425=yes -else - have_des425=no -fi - - if test $have_des425 = yes; then - DESLIB=-ldes425 - LIBS="$DESLIB $LIBS" - -$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 -$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } -if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldes $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char des_cbc_encrypt (); -int -main () -{ -return des_cbc_encrypt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_des_des_cbc_encrypt=yes -else - ac_cv_lib_des_des_cbc_encrypt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 -$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then : - have_des=yes -else - have_des=no -fi - - if test $have_des = yes; then - DESLIB=-ldes - LIBS="$DESLIB $LIBS" - -$as_echo "#define HAVE_LIBDES 1" >>confdefs.h - - fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 -$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } -if ${ac_cv_lib_krb4_krb_get_cred+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb4 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char krb_get_cred (); -int -main () -{ -return krb_get_cred (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_krb4_krb_get_cred=yes -else - ac_cv_lib_krb4_krb_get_cred=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 -$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } -if test "x$ac_cv_lib_krb4_krb_get_cred" = xyes; then : - have_krb4=yes -else - have_krb4=no -fi - - if test $have_krb4 = yes; then - KRB4LIB=-lkrb4 - LIBS="$KRB4LIB $LIBS" - -$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 -$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } -if ${ac_cv_lib_krb_krb_get_cred+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char krb_get_cred (); -int -main () -{ -return krb_get_cred (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_krb_krb_get_cred=yes -else - ac_cv_lib_krb_krb_get_cred=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 -$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } -if test "x$ac_cv_lib_krb_krb_get_cred" = xyes; then : - have_krb=yes -else - have_krb=no -fi - - if test $have_krb = yes; then - KRB4LIB=-lkrb - LIBS="$KRB4LIB $LIBS" - -$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h - - fi - fi - fi - - if test "${with_kerberos5}" != no; then - for ac_header in krb5.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" -if test "x$ac_cv_header_krb5_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_H 1 -_ACEOF - ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include -" -if test "x$ac_cv_member_krb5_error_text" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_ERROR_TEXT 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include -" -if test "x$ac_cv_member_krb5_error_e_text" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_ERROR_E_TEXT 1 -_ACEOF - - -fi - -fi - -done - - else - for ac_header in des.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" -if test "x$ac_cv_header_des_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DES_H 1 -_ACEOF - -else - for ac_header in kerberosIV/des.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberosIV_des_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KERBEROSIV_DES_H 1 -_ACEOF - -else - for ac_header in kerberos/des.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberos_des_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KERBEROS_DES_H 1 -_ACEOF - -fi - -done - -fi - -done - -fi - -done - - for ac_header in krb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_krb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB_H 1 -_ACEOF - -else - for ac_header in kerberosIV/krb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberosIV_krb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KERBEROSIV_KRB_H 1 -_ACEOF - -else - for ac_header in kerberos/krb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberos_krb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KERBEROS_KRB_H 1 -_ACEOF - -fi - -done - -fi - -done - -fi - -done - - fi - for ac_header in com_err.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_com_err_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_COM_ERR_H 1 -_ACEOF - -fi - -done - -fi - - - - - - - -# Solaris requires -lintl if you want strerror (which calls dgettext) -# to return localized messages. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 -$as_echo_n "checking for dgettext in -lintl... " >&6; } -if ${ac_cv_lib_intl_dgettext+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dgettext (); -int -main () -{ -return dgettext (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_intl_dgettext=yes -else - ac_cv_lib_intl_dgettext=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 -$as_echo "$ac_cv_lib_intl_dgettext" >&6; } -if test "x$ac_cv_lib_intl_dgettext" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBINTL 1 -_ACEOF - - LIBS="-lintl $LIBS" - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 -$as_echo_n "checking whether localtime caches TZ... " >&6; } -if ${emacs_cv_localtime_cache+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test x$ac_cv_func_tzset = xyes; then -if test "$cross_compiling" = yes; then : - # If we have tzset, assume the worst when cross-compiling. -emacs_cv_localtime_cache=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -char TZ_GMT0[] = "TZ=GMT0"; -char TZ_PST8[] = "TZ=PST8"; -main() -{ - time_t now = time ((time_t *) 0); - int hour_GMT0, hour_unset; - if (putenv (TZ_GMT0) != 0) - exit (1); - hour_GMT0 = localtime (&now)->tm_hour; - unsetenv("TZ"); - hour_unset = localtime (&now)->tm_hour; - if (putenv (TZ_PST8) != 0) - exit (1); - if (localtime (&now)->tm_hour == hour_GMT0) - exit (1); - unsetenv("TZ"); - if (localtime (&now)->tm_hour != hour_unset) - exit (1); - exit (0); -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - emacs_cv_localtime_cache=no -else - emacs_cv_localtime_cache=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -else - # If we lack tzset, report that localtime does not cache TZ, - # since we can't invalidate the cache if we don't have tzset. - emacs_cv_localtime_cache=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 -$as_echo "$emacs_cv_localtime_cache" >&6; } -if test $emacs_cv_localtime_cache = yes; then - -$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h - -fi - -if test "x$HAVE_TIMEVAL" = xyes; then - for ac_func in gettimeofday -do : - ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETTIMEOFDAY 1 -_ACEOF - -fi -done - - if test $ac_cv_func_gettimeofday = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 -$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } -if ${emacs_cv_gettimeofday_two_arguments+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef TIME_WITH_SYS_TIME -#include -#include -#else -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif -int -main () -{ -struct timeval time; - gettimeofday (&time, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_gettimeofday_two_arguments=yes -else - emacs_cv_gettimeofday_two_arguments=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5 -$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; } - if test $emacs_cv_gettimeofday_two_arguments = no; then - -$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h - - fi - fi -fi - -ok_so_far=yes -ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = xyes; then : - -else - ok_so_far=no -fi - -if test $ok_so_far = yes; then - ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" -if test "x$ac_cv_header_netinet_in_h" = xyes; then : - -else - ok_so_far=no -fi - - -fi -if test $ok_so_far = yes; then - ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" -if test "x$ac_cv_header_arpa_inet_h" = xyes; then : - -else - ok_so_far=no -fi - - -fi -if test $ok_so_far = yes; then - -$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h - -fi - -if test -f /usr/lpp/X11/bin/smt.exp; then - -$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 -$as_echo_n "checking whether system supports dynamic ptys... " >&6; } -if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -for ac_header in vfork.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" -if test "x$ac_cv_header_vfork_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VFORK_H 1 -_ACEOF - -fi - -done - -for ac_func in fork vfork -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -if test "x$ac_cv_func_fork" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 -$as_echo_n "checking for working fork... " >&6; } -if ${ac_cv_func_fork_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_fork_works=cross -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* By Ruediger Kuhlmann. */ - return fork () < 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_fork_works=yes -else - ac_cv_func_fork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 -$as_echo "$ac_cv_func_fork_works" >&6; } - -else - ac_cv_func_fork_works=$ac_cv_func_fork -fi -if test "x$ac_cv_func_fork_works" = xcross; then - case $host in - *-*-amigaos* | *-*-msdosdjgpp*) - # Override, as these systems have only a dummy fork() stub - ac_cv_func_fork_works=no - ;; - *) - ac_cv_func_fork_works=yes - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} -fi -ac_cv_func_vfork_works=$ac_cv_func_vfork -if test "x$ac_cv_func_vfork" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 -$as_echo_n "checking for working vfork... " >&6; } -if ${ac_cv_func_vfork_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_vfork_works=cross -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Thanks to Paul Eggert for this test. */ -$ac_includes_default -#include -#ifdef HAVE_VFORK_H -# include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. The compiler - is told about this with #include , but some compilers - (e.g. gcc -O) don't grok . Test for this by using a - static variable whose address is put into a register that is - clobbered by the vfork. */ -static void -#ifdef __cplusplus -sparc_address_test (int arg) -# else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} - -int -main () -{ - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (0); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. This - test uses lots of local variables, at least as many local - variables as main has allocated so far including compiler - temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris - 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should - reuse the register of parent for one of the local variables, - since it will think that parent can't possibly be used any more - in this routine. Assigning to the local variable will thus - munge parent in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent - from child file descriptors. If the child closes a descriptor - before it execs or exits, this munges the parent's descriptor - as well. Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - return ( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_vfork_works=yes -else - ac_cv_func_vfork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 -$as_echo "$ac_cv_func_vfork_works" >&6; } - -fi; -if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=$ac_cv_func_vfork - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} -fi - -if test "x$ac_cv_func_vfork_works" = xyes; then - -$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h - -else - -$as_echo "#define vfork fork" >>confdefs.h - -fi -if test "x$ac_cv_func_fork_works" = xyes; then - -$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 -$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if ${emacs_cv_langinfo_codeset+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -char* cs = nl_langinfo(CODESET); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_langinfo_codeset=yes -else - emacs_cv_langinfo_codeset=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 -$as_echo "$emacs_cv_langinfo_codeset" >&6; } -if test $emacs_cv_langinfo_codeset = yes; then - -$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SIZE_T 1 -_ACEOF - - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 -$as_echo_n "checking for mbstate_t... " >&6; } -if ${ac_cv_type_mbstate_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -# include -int -main () -{ -mbstate_t x; return sizeof x; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_mbstate_t=yes -else - ac_cv_type_mbstate_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 -$as_echo "$ac_cv_type_mbstate_t" >&6; } - if test $ac_cv_type_mbstate_t = yes; then - -$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h - - else - -$as_echo "#define mbstate_t int" >>confdefs.h - - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 -$as_echo_n "checking for C restricted array declarations... " >&6; } -if ${emacs_cv_c_restrict_arr+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void fred (int x[__restrict]); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_c_restrict_arr=yes -else - emacs_cv_c_restrict_arr=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 -$as_echo "$emacs_cv_c_restrict_arr" >&6; } -if test "$emacs_cv_c_restrict_arr" = yes; then - -$as_echo "#define __restrict_arr __restrict" >>confdefs.h - -fi - - - -# Set up the CFLAGS for real compilation, so we can substitute it. -CFLAGS="$REAL_CFLAGS" -CPPFLAGS="$REAL_CPPFLAGS" - -## Hack to detect a buggy GCC version. -if test "x$GCC" = xyes \ - && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ - && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ - && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then - as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 -fi - -version=$PACKAGE_VERSION - -### Specify what sort of things we'll be editing into Makefile and config.h. -### Use configuration here uncanonicalized to avoid exceeding size limits. - - -## Unused? - - - - - - - - - - - - - - - - - - - - -## FIXME? Nothing uses @LD_SWITCH_X_SITE@. -## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the -## end of LIBX_BASE, but nothing ever set it. - - - - -## Used in lwlib/Makefile.in. - -if test -n "${machfile}"; then - M_FILE="\$(srcdir)/${machfile}" -else - M_FILE= -fi -S_FILE="\$(srcdir)/${opsysfile}" - - - - - - - - - - -cat >>confdefs.h <<_ACEOF -#define EMACS_CONFIGURATION "${canonical}" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define EMACS_CONFIG_OPTIONS "${ac_configure_args}" -_ACEOF - -if test -n "$machfile"; then - -cat >>confdefs.h <<_ACEOF -#define config_machfile "${machfile}" -_ACEOF - -fi - -cat >>confdefs.h <<_ACEOF -#define config_opsysfile "${opsysfile}" -_ACEOF - - -XMENU_OBJ= -XOBJ= -FONT_OBJ= -if test "${HAVE_X_WINDOWS}" = "yes" ; then - -$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h - - XMENU_OBJ=xmenu.o - XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" - FONT_OBJ=xfont.o - if test "$HAVE_XFT" = "yes"; then - FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" - elif test "$HAVE_FREETYPE" = "yes"; then - FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" - fi - -fi - - - - -WIDGET_OBJ= -MOTIF_LIBW= -if test "${USE_X_TOOLKIT}" != "none" ; then - WIDGET_OBJ=widget.o - -$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h - - if test "${USE_X_TOOLKIT}" = "LUCID"; then - -$as_echo "#define USE_LUCID 1" >>confdefs.h - - elif test "${USE_X_TOOLKIT}" = "MOTIF"; then - -$as_echo "#define USE_MOTIF 1" >>confdefs.h - - MOTIF_LIBW=-lXm - case "$opsys" in - gnu-linux) - ## Paul Abrahams says this is needed. - MOTIF_LIBW="$MOTIF_LIBW -lXpm" - ;; - - unixware) - ## Richard Anthony Ryan - ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. - MOTIF_LIBW="MOTIF_LIBW -lXimp" - ;; - - aix4-2) - ## olson@mcs.anl.gov says -li18n is needed by -lXm. - MOTIF_LIBW="$MOTIF_LIBW -li18n" - ;; - esac - MOTIF_LIBW="$MOTIF_LIBW $LIBXP" - fi -fi - - -TOOLKIT_LIBW= -case "$USE_X_TOOLKIT" in - MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; - LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; - none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; -esac - - -if test "$USE_X_TOOLKIT" = "none"; then - LIBXT_OTHER="\$(LIBXSM)" - OLDXMENU_TARGET="really-oldXMenu" -else - LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" - OLDXMENU_TARGET="really-lwlib" -fi - - -## The X Menu stuff is present in the X10 distribution, but missing -## from X11. If we have X10, just use the installed library; -## otherwise, use our own copy. -if test "${HAVE_X11}" = "yes" ; then - -$as_echo "#define HAVE_X11 1" >>confdefs.h - - - if test "$USE_X_TOOLKIT" = "none"; then - OLDXMENU="\${oldXMenudir}/libXMenu11.a" - else - OLDXMENU="\${lwlibdir}/liblw.a" - fi - LIBXMENU="\$(OLDXMENU)" - LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" - OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" -else - ## For a syntactically valid Makefile; not actually used for anything. - ## See comments in src/Makefile.in. - OLDXMENU=nothing - ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). - if test "${HAVE_X_WINDOWS}" = "yes"; then - LIBXMENU="-lXMenu" - else - LIBXMENU= - fi - LIBX_OTHER= - OLDXMENU_DEPS= -fi - -if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then - OLDXMENU_TARGET= - OLDXMENU=nothing - LIBXMENU= - OLDXMENU_DEPS= -fi - - - - - - - -if test "${HAVE_MENUS}" = "yes" ; then - -$as_echo "#define HAVE_MENUS 1" >>confdefs.h - -fi - -if test "${GNU_MALLOC}" = "yes" ; then - -$as_echo "#define GNU_MALLOC 1" >>confdefs.h - -fi - -RALLOC_OBJ= -if test "${REL_ALLOC}" = "yes" ; then - -$as_echo "#define REL_ALLOC 1" >>confdefs.h - - - test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o -fi - - -if test "$opsys" = "cygwin"; then - CYGWIN_OBJ="sheap.o" - ## Cygwin differs because of its unexec(). - PRE_ALLOC_OBJ= - POST_ALLOC_OBJ=lastfile.o -else - CYGWIN_OBJ= - PRE_ALLOC_OBJ=lastfile.o - POST_ALLOC_OBJ= -fi - - - - - -case "$opsys" in - aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; - - darwin) - ## The -headerpad option tells ld (see man page) to leave room at the - ## end of the header for adding load commands. Needed for dumping. - ## 0x690 is the total size of 30 segment load commands (at 56 - ## each); under Cocoa 31 commands are required. - if test "$HAVE_NS" = "yes"; then - libs_nsgui="-framework AppKit" - headerpad_extra=6C8 - else - libs_nsgui= - headerpad_extra=690 - fi - LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" - - ## This is here because src/Makefile.in did some extra fiddling around - ## with LD_SWITCH_SYSTEM. The cpp logic was: - ## #ifndef LD_SWITCH_SYSTEM - ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) - ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: - ## not using gcc, darwin system not on an alpha (ie darwin, since - ## darwin + alpha does not occur). - ## Because this was done in src/Makefile.in, the resulting part of - ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). - ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, - ## rather than LD_SWITCH_SYSTEM. - test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ - LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" - ;; - - ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time. - ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at - ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX - ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM - ## had different values in configure (in ac_link) and src/Makefile.in. - ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. - gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; - - *) LD_SWITCH_SYSTEM_TEMACS= ;; -esac - -if test "$NS_IMPL_GNUSTEP" = "yes"; then - LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread" -fi - - - - -LD_FIRSTFLAG= -ORDINARY_LINK= -case "$opsys" in - ## gnu: GNU needs its own crt0. - aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; - - ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the - ## library search parth, i.e. it won't search /usr/lib for libc and - ## friends. Using -nostartfiles instead avoids this problem, and - ## will also work on earlier NetBSD releases. - netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; - - ## macpcc: NAKAJI Hiroyuki says - ## MkLinux/LinuxPPC needs this. - ## ibms390x only supports opsys = gnu-linux so it can be added here. - gnu-*) - case "$machine" in - macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;; - esac - ;; -esac - - -if test "x$ORDINARY_LINK" = "xyes"; then - - LD_FIRSTFLAG="" - -$as_echo "#define ORDINARY_LINK 1" >>confdefs.h - - -## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are: -## freebsd, gnu-* not on macppc|ibms390x. -elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then - - ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure - ## places that are difficult to figure out at make time. Fortunately, - ## these same versions allow you to pass arbitrary flags on to the - ## linker, so there is no reason not to use it as a linker. - ## - ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from - ## searching for libraries in its internal directories, so we have to - ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). - LD_FIRSTFLAG="-nostdlib" -fi - -## FIXME? What setting of EDIT_LDFLAGS should this have? -test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic" - - - - -## FIXME? The logic here is not precisely the same as that above. -## There is no check here for a pre-defined LD_FIRSTFLAG. -## Should we only be setting LIB_GCC if LD ~ -nostdlib? -LIB_GCC= -if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then - - case "$opsys" in - freebsd|netbsd|openbsd) LIB_GCC= ;; - - gnu-*) - ## armin76@gentoo.org reported that the lgcc_s flag is necessary to - ## build on ARM EABI under GNU/Linux. (Bug#5518) - case $host_cpu in - arm*) - LIB_GCC="-lgcc_s" - ;; - *) - ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then - ## immediately undefine it again and redefine it to empty. - ## Was the C_SWITCH_X_SITE part really necessary? -## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name` - LIB_GCC= - ;; - esac - ;; - - ## Ask GCC where to find libgcc.a. - *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;; - esac -fi - - -TOOLTIP_SUPPORT= -WINDOW_SUPPORT= -## If we're using X11/GNUstep, define some consequences. -if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then - -$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h - - -$as_echo "#define HAVE_MOUSE 1" >>confdefs.h - - MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)" - TOOLTIP_SUPPORT="\${lispsource}/mouse.elc" - - WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)" - test "$HAVE_X_WINDOWS" = "yes" && \ - WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)" - -fi - - - - - - - -#### Report on what we decided to do. -#### Report GTK as a toolkit, even if it doesn't use Xt. -#### It makes printing result more understandable as using GTK sets -#### toolkit_scroll_bars to yes by default. -if test "${HAVE_GTK}" = "yes"; then - USE_X_TOOLKIT=GTK -fi - -and_machfile= -if test -n "$machfile"; then - and_machfile=" and \`${machfile}'" -fi - -echo " -Configured for \`${canonical}'. - - Where should the build process find the source code? ${srcdir} - What operating system and machine description files should Emacs use? - \`${opsysfile}'${and_machfile} - What compiler should emacs be built with? ${CC} ${CFLAGS} - Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} - Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} - Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers - What window system should Emacs use? ${window_system} - What toolkit should Emacs use? ${USE_X_TOOLKIT}" - -if test -n "${x_includes}"; then -echo " Where do we find X Windows header files? ${x_includes}" -else -echo " Where do we find X Windows header files? Standard dirs" -fi -if test -n "${x_libraries}"; then -echo " Where do we find X Windows libraries? ${x_libraries}" -else -echo " Where do we find X Windows libraries? Standard dirs" -fi - -echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}" -echo " Does Emacs use -lXpm? ${HAVE_XPM}" -echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" -echo " Does Emacs use -ltiff? ${HAVE_TIFF}" -echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" -echo " Does Emacs use -lpng? ${HAVE_PNG}" -echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" -echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" - -echo " Does Emacs use -lgpm? ${HAVE_GPM}" -echo " Does Emacs use -ldbus? ${HAVE_DBUS}" -echo " Does Emacs use -lgconf? ${HAVE_GCONF}" -echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" -echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}" -echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" - -echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" -echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" -echo " Does Emacs use -lotf? ${HAVE_LIBOTF}" -echo " Does Emacs use -lxft? ${HAVE_XFT}" - -echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" -echo - -if test $USE_XASSERTS = yes; then - echo " Compiling with asserts turned on." - CPPFLAGS="$CPPFLAGS -DXASSERTS=1" -fi - -echo - -if test "$HAVE_NS" = "yes"; then - echo - echo "You must run \"make install\" in order to test the built application. -The installed application will go to nextstep/Emacs.app and can be -run or moved from there." - if test "$EN_NS_SELF_CONTAINED" = "yes"; then - echo "The application will be fully self-contained." - else - echo "The lisp resources for the application will be installed under ${prefix}. -You may need to run \"make install\" with sudo. The application will fail -to run if these resources are not installed." - fi - echo -fi - - -# Remove any trailing slashes in these variables. -test "${prefix}" != NONE && - prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` -test "${exec_prefix}" != NONE && - exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` - -ac_config_files="$ac_config_files Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile test/automated/Makefile" - - -ac_config_commands="$ac_config_commands mkdirs" - - -ac_config_commands="$ac_config_commands epaths" - - -ac_config_commands="$ac_config_commands gdbinit" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then - as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - - - gl_libobjs= - gl_ltlibobjs= - if test -n "$gl_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - gl_libobjs="$gl_libobjs $i.$ac_objext" - gl_ltlibobjs="$gl_ltlibobjs $i.lo" - done - fi - gl_LIBOBJS=$gl_libobjs - - gl_LTLIBOBJS=$gl_ltlibobjs - - - - gltests_libobjs= - gltests_ltlibobjs= - if test -n "$gltests_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - gltests_libobjs="$gltests_libobjs $i.$ac_objext" - gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" - done - fi - gltests_LIBOBJS=$gltests_libobjs - - gltests_LTLIBOBJS=$gltests_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.68. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to the package provider." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -emacs config.status 24.0.50 -configured by $0, generated by GNU Autoconf 2.68, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" -GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; - "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; - "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;; - "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;; - "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; - "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;; - "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;; - "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; - "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; - "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; - "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; - "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;; - "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; - "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - -if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then - ac_cs_awk_getline=: - ac_cs_awk_pipe_init= - ac_cs_awk_read_file=' - while ((getline aline < (F[key])) > 0) - print(aline) - close(F[key])' - ac_cs_awk_pipe_fini= -else - ac_cs_awk_getline=false - ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" - ac_cs_awk_read_file=' - print "|#_!!_#|" - print "cat " F[key] " &&" - '$ac_cs_awk_pipe_init - # The final `:' finishes the AND list. - ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' -fi -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - -# Create commands to substitute file output variables. -{ - echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && - echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && - echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && - echo "_ACAWK" && - echo "_ACEOF" -} >conf$$files.sh && -. ./conf$$files.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -rm -f conf$$files.sh - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - \$ac_cs_awk_pipe_init -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - if (nfields == 3 && !substed) { - key = field[2] - if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { - \$ac_cs_awk_read_file - next - } - } - print line -} -\$ac_cs_awk_pipe_fini -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | -if $ac_cs_awk_getline; then - $AWK -f "$ac_tmp/subs.awk" -else - $AWK -f "$ac_tmp/subs.awk" | $SHELL -fi \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "mkdirs":C) -for dir in etc lisp ; do - test -d ${dir} || mkdir ${dir} -done - ;; - "epaths":C) -echo creating src/epaths.h -${MAKE-make} epaths-force - ;; - "gdbinit":C) -if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then - echo creating src/.gdbinit - echo source $srcdir/src/.gdbinit > src/.gdbinit -fi - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - diff --git a/lib/Makefile.in b/lib/Makefile.in deleted file mode 100644 index f3e867a485a..00000000000 --- a/lib/Makefile.in +++ /dev/null @@ -1,1492 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright (C) 2002-2011 Free Software Foundation, Inc. -# -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdio strftime symlink sys_stat - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/gnulib.mk COPYING -subdir = lib -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/extensions.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/getloadavg.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gl-comp.m4 \ - $(top_srcdir)/m4/gnulib-common.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/md5.m4 \ - $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/socklen.m4 \ - $(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat.m4 \ - $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdio_h.m4 \ - $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \ - $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ - $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ - $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -AR = ar -ARFLAGS = cru -libgnu_a_AR = $(AR) $(ARFLAGS) -am__DEPENDENCIES_1 = -am_libgnu_a_OBJECTS = dtoastr.$(OBJEXT) -libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) -DIST_SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -ALSA_CFLAGS = @ALSA_CFLAGS@ -ALSA_LIBS = @ALSA_LIBS@ -AMTAR = @AMTAR@ -APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -BLESSMAIL_TARGET = @BLESSMAIL_TARGET@ -CANNOT_DUMP = @CANNOT_DUMP@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CFLAGS_SOUND = @CFLAGS_SOUND@ -COM_ERRLIB = @COM_ERRLIB@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CRT_DIR = @CRT_DIR@ -CRYPTOLIB = @CRYPTOLIB@ -CYGPATH_W = @CYGPATH_W@ -CYGWIN_OBJ = @CYGWIN_OBJ@ -C_SWITCH_MACHINE = @C_SWITCH_MACHINE@ -C_SWITCH_SYSTEM = @C_SWITCH_SYSTEM@ -C_SWITCH_X_SITE = @C_SWITCH_X_SITE@ -C_SWITCH_X_SYSTEM = @C_SWITCH_X_SYSTEM@ -C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DBUS_OBJ = @DBUS_OBJ@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DEPFLAGS = @DEPFLAGS@ -DESLIB = @DESLIB@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FONT_OBJ = @FONT_OBJ@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -GCONF_CFLAGS = @GCONF_CFLAGS@ -GCONF_LIBS = @GCONF_LIBS@ -GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ -GETOPT_H = @GETOPT_H@ -GMALLOC_OBJ = @GMALLOC_OBJ@ -GNULIB_ATOLL = @GNULIB_ATOLL@ -GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ -GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ -GNULIB_CHOWN = @GNULIB_CHOWN@ -GNULIB_CLOSE = @GNULIB_CLOSE@ -GNULIB_DPRINTF = @GNULIB_DPRINTF@ -GNULIB_DUP2 = @GNULIB_DUP2@ -GNULIB_DUP3 = @GNULIB_DUP3@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FFLUSH = @GNULIB_FFLUSH@ -GNULIB_FOPEN = @GNULIB_FOPEN@ -GNULIB_FPRINTF = @GNULIB_FPRINTF@ -GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ -GNULIB_FPURGE = @GNULIB_FPURGE@ -GNULIB_FPUTC = @GNULIB_FPUTC@ -GNULIB_FPUTS = @GNULIB_FPUTS@ -GNULIB_FREOPEN = @GNULIB_FREOPEN@ -GNULIB_FSEEK = @GNULIB_FSEEK@ -GNULIB_FSEEKO = @GNULIB_FSEEKO@ -GNULIB_FSTATAT = @GNULIB_FSTATAT@ -GNULIB_FSYNC = @GNULIB_FSYNC@ -GNULIB_FTELL = @GNULIB_FTELL@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ -GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ -GNULIB_GRANTPT = @GNULIB_GRANTPT@ -GNULIB_LCHMOD = @GNULIB_LCHMOD@ -GNULIB_LCHOWN = @GNULIB_LCHOWN@ -GNULIB_LINK = @GNULIB_LINK@ -GNULIB_LINKAT = @GNULIB_LINKAT@ -GNULIB_LSEEK = @GNULIB_LSEEK@ -GNULIB_LSTAT = @GNULIB_LSTAT@ -GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ -GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ -GNULIB_PERROR = @GNULIB_PERROR@ -GNULIB_PIPE = @GNULIB_PIPE@ -GNULIB_PIPE2 = @GNULIB_PIPE2@ -GNULIB_POPEN = @GNULIB_POPEN@ -GNULIB_PREAD = @GNULIB_PREAD@ -GNULIB_PRINTF = @GNULIB_PRINTF@ -GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ -GNULIB_PTSNAME = @GNULIB_PTSNAME@ -GNULIB_PUTC = @GNULIB_PUTC@ -GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ -GNULIB_PUTENV = @GNULIB_PUTENV@ -GNULIB_PUTS = @GNULIB_PUTS@ -GNULIB_PWRITE = @GNULIB_PWRITE@ -GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ -GNULIB_READLINK = @GNULIB_READLINK@ -GNULIB_READLINKAT = @GNULIB_READLINKAT@ -GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -GNULIB_RENAME = @GNULIB_RENAME@ -GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ -GNULIB_RMDIR = @GNULIB_RMDIR@ -GNULIB_RPMATCH = @GNULIB_RPMATCH@ -GNULIB_SETENV = @GNULIB_SETENV@ -GNULIB_SLEEP = @GNULIB_SLEEP@ -GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ -GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ -GNULIB_STAT = @GNULIB_STAT@ -GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@ -GREP = @GREP@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ -GTK_OBJ = @GTK_OBJ@ -GZIP_INFO = @GZIP_INFO@ -GZIP_PROG = @GZIP_PROG@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ -HAVE_CHOWN = @HAVE_CHOWN@ -HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ -HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ -HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ -HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ -HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ -HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ -HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ -HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ -HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ -HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -HAVE_FCHDIR = @HAVE_FCHDIR@ -HAVE_FCHMODAT = @HAVE_FCHMODAT@ -HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ -HAVE_FSEEKO = @HAVE_FSEEKO@ -HAVE_FSTATAT = @HAVE_FSTATAT@ -HAVE_FSYNC = @HAVE_FSYNC@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MAKEINFO = @HAVE_MAKEINFO@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ -HAVE_OS_H = @HAVE_OS_H@ -HAVE_PIPE = @HAVE_PIPE@ -HAVE_PIPE2 = @HAVE_PIPE2@ -HAVE_PREAD = @HAVE_PREAD@ -HAVE_PTSNAME = @HAVE_PTSNAME@ -HAVE_PWRITE = @HAVE_PWRITE@ -HAVE_RANDOM_H = @HAVE_RANDOM_H@ -HAVE_RANDOM_R = @HAVE_RANDOM_R@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -HAVE_REALPATH = @HAVE_REALPATH@ -HAVE_RENAMEAT = @HAVE_RENAMEAT@ -HAVE_RPMATCH = @HAVE_RPMATCH@ -HAVE_SETENV = @HAVE_SETENV@ -HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ -HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ -HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_XSERVER = @HAVE_XSERVER@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -IMAGEMAGICK_CFLAGS = @IMAGEMAGICK_CFLAGS@ -IMAGEMAGICK_LIBS = @IMAGEMAGICK_LIBS@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_INFO = @INSTALL_INFO@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KRB4LIB = @KRB4LIB@ -KRB5LIB = @KRB5LIB@ -LDFLAGS = @LDFLAGS@ -LD_FIRSTFLAG = @LD_FIRSTFLAG@ -LD_SWITCH_SYSTEM = @LD_SWITCH_SYSTEM@ -LD_SWITCH_SYSTEM_TEMACS = @LD_SWITCH_SYSTEM_TEMACS@ -LD_SWITCH_X_SITE = @LD_SWITCH_X_SITE@ -LD_SWITCH_X_SITE_AUX = @LD_SWITCH_X_SITE_AUX@ -LD_SWITCH_X_SITE_AUX_RPATH = @LD_SWITCH_X_SITE_AUX_RPATH@ -LIBGIF = @LIBGIF@ -LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ -LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ -LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ -LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ -LIBGPM = @LIBGPM@ -LIBHESIOD = @LIBHESIOD@ -LIBINTL = @LIBINTL@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBOTF_CFLAGS = @LIBOTF_CFLAGS@ -LIBOTF_LIBS = @LIBOTF_LIBS@ -LIBPNG = @LIBPNG@ -LIBRESOLV = @LIBRESOLV@ -LIBS = @LIBS@ -LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ -LIBSOUND = @LIBSOUND@ -LIBS_MAIL = @LIBS_MAIL@ -LIBS_SYSTEM = @LIBS_SYSTEM@ -LIBS_TERMCAP = @LIBS_TERMCAP@ -LIBTIFF = @LIBTIFF@ -LIBXMENU = @LIBXMENU@ -LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ -LIBXML2_LIBS = @LIBXML2_LIBS@ -LIBXMU = @LIBXMU@ -LIBXPM = @LIBXPM@ -LIBXSM = @LIBXSM@ -LIBXTR6 = @LIBXTR6@ -LIBXT_OTHER = @LIBXT_OTHER@ -LIBX_OTHER = @LIBX_OTHER@ -LIB_GCC = @LIB_GCC@ -LIB_MATH = @LIB_MATH@ -LIB_STANDARD = @LIB_STANDARD@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@ -M17N_FLT_LIBS = @M17N_FLT_LIBS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDEPDIR = @MKDEPDIR@ -MKDIR_P = @MKDIR_P@ -MOUSE_SUPPORT = @MOUSE_SUPPORT@ -M_FILE = @M_FILE@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ -NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ -NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ -NEXT_GETOPT_H = @NEXT_GETOPT_H@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ -NEXT_TIME_H = @NEXT_TIME_H@ -NEXT_UNISTD_H = @NEXT_UNISTD_H@ -NS_OBJ = @NS_OBJ@ -NS_OBJC_OBJ = @NS_OBJC_OBJ@ -NS_SUPPORT = @NS_SUPPORT@ -OBJEXT = @OBJEXT@ -OLDXMENU = @OLDXMENU@ -OLDXMENU_DEPS = @OLDXMENU_DEPS@ -OLDXMENU_TARGET = @OLDXMENU_TARGET@ -OTHER_FILES = @OTHER_FILES@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -POST_ALLOC_OBJ = @POST_ALLOC_OBJ@ -PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ -PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ -PRE_ALLOC_OBJ = @PRE_ALLOC_OBJ@ -PROFILING_CFLAGS = @PROFILING_CFLAGS@ -PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ -PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ -RALLOC_OBJ = @RALLOC_OBJ@ -RANLIB = @RANLIB@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ -REPLACE_GETLINE = @REPLACE_GETLINE@ -REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ -REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ -REPLACE_LCHOWN = @REPLACE_LCHOWN@ -REPLACE_LINK = @REPLACE_LINK@ -REPLACE_LINKAT = @REPLACE_LINKAT@ -REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ -REPLACE_LSEEK = @REPLACE_LSEEK@ -REPLACE_LSTAT = @REPLACE_LSTAT@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_PERROR = @REPLACE_PERROR@ -REPLACE_POPEN = @REPLACE_POPEN@ -REPLACE_PREAD = @REPLACE_PREAD@ -REPLACE_PRINTF = @REPLACE_PRINTF@ -REPLACE_PUTENV = @REPLACE_PUTENV@ -REPLACE_PWRITE = @REPLACE_PWRITE@ -REPLACE_READLINK = @REPLACE_READLINK@ -REPLACE_REALLOC = @REPLACE_REALLOC@ -REPLACE_REALPATH = @REPLACE_REALPATH@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SLEEP = @REPLACE_SLEEP@ -REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ -REPLACE_SPRINTF = @REPLACE_SPRINTF@ -REPLACE_STAT = @REPLACE_STAT@ -REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_SYMLINK = @REPLACE_SYMLINK@ -REPLACE_TIMEGM = @REPLACE_TIMEGM@ -REPLACE_TMPFILE = @REPLACE_TMPFILE@ -REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -REPLACE_UNLINK = @REPLACE_UNLINK@ -REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WRITE = @REPLACE_WRITE@ -RSVG_CFLAGS = @RSVG_CFLAGS@ -RSVG_LIBS = @RSVG_LIBS@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -START_FILES = @START_FILES@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -S_FILE = @S_FILE@ -TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@ -TERMCAP_OBJ = @TERMCAP_OBJ@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -TOOLKIT_LIBW = @TOOLKIT_LIBW@ -TOOLTIP_SUPPORT = @TOOLTIP_SUPPORT@ -UNEXEC_OBJ = @UNEXEC_OBJ@ -UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ -UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ -VERSION = @VERSION@ -VMLIMIT_OBJ = @VMLIMIT_OBJ@ -WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ -WIDGET_OBJ = @WIDGET_OBJ@ -WINDOW_SUPPORT = @WINDOW_SUPPORT@ -WINT_T_SUFFIX = @WINT_T_SUFFIX@ -XFT_CFLAGS = @XFT_CFLAGS@ -XFT_LIBS = @XFT_LIBS@ -XMENU_OBJ = @XMENU_OBJ@ -XMKMF = @XMKMF@ -XOBJ = @XOBJ@ -X_TOOLKIT_TYPE = @X_TOOLKIT_TYPE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -archlibdir = @archlibdir@ -bindir = @bindir@ -bitmapdir = @bitmapdir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -canonical = @canonical@ -configuration = @configuration@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -etcdir = @etcdir@ -exec_prefix = @exec_prefix@ -gamedir = @gamedir@ -gameuser = @gameuser@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -liblockfile = @liblockfile@ -lispdir = @lispdir@ -lisppath = @lisppath@ -localedir = @localedir@ -locallisppath = @locallisppath@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -ns_appbindir = @ns_appbindir@ -ns_appdir = @ns_appdir@ -ns_appresdir = @ns_appresdir@ -ns_appsrc = @ns_appsrc@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version = @version@ -x_default_search_path = @x_default_search_path@ - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. -BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) $(STDBOOL_H) \ - $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h sys/stat.h time.h \ - unistd.h warn-on-use.h -EXTRA_DIST = $(top_srcdir)/./arg-nonnull.h $(top_srcdir)/./c++defs.h \ - md5.c md5.h dosname.h ftoastr.c ftoastr.h filemode.c \ - filemode.h getloadavg.c getopt.c getopt.in.h getopt1.c \ - getopt_int.h intprops.h lstat.c mktime-internal.h mktime.c \ - readlink.c stat.c stdbool.in.h stddef.in.h stdint.in.h \ - stdio.in.h stdlib.in.h strftime.c strftime.h symlink.c \ - sys_stat.in.h time.in.h time_r.c unistd.in.h \ - $(top_srcdir)/./warn-on-use.h -MOSTLYCLEANDIRS = sys -MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ - c++defs.h c++defs.h-t getopt.h getopt.h-t stdbool.h \ - stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \ - stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \ - time.h-t unistd.h unistd.h-t warn-on-use.h warn-on-use.h-t -noinst_LIBRARIES = libgnu.a -DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src -libgnu_a_SOURCES = dtoastr.c gettext.h ignore-value.h -libgnu_a_LIBADD = $(gl_LIBOBJS) -libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) -EXTRA_libgnu_a_SOURCES = md5.c ftoastr.c filemode.c getloadavg.c \ - getopt.c getopt1.c lstat.c mktime.c readlink.c stat.c \ - strftime.c symlink.c time_r.c -ARG_NONNULL_H = arg-nonnull.h -CXXDEFS_H = c++defs.h -WARN_ON_USE_H = warn-on-use.h -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/gnulib.mk $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) - -rm -f libgnu.a - $(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD) - $(RANLIB) libgnu.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtoastr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LIBRARIES) -installdirs: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-local - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: all check install install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am tags \ - uninstall uninstall-am - -# The arg-nonnull.h that gets inserted into generated .h files is the same as -# build-aux/arg-nonnull.h, except that it has the copyright header cut off. -arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_ARG_NONNULL/,$$p' \ - < $(top_srcdir)/./arg-nonnull.h \ - > $@-t && \ - mv $@-t $@ -# The c++defs.h that gets inserted into generated .h files is the same as -# build-aux/c++defs.h, except that it has the copyright header cut off. -c++defs.h: $(top_srcdir)/./c++defs.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/_GL_CXXDEFS/,$$p' \ - < $(top_srcdir)/./c++defs.h \ - > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -getopt.h: getopt.in.h $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/getopt.in.h; \ - } > $@-t && \ - mv -f $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works. -stdbool.h: stdbool.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stddef.h: stddef.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ - -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ - -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ - < $(srcdir)/stddef.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdint.h: stdint.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ - -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ - -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ - -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ - -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ - -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ - -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ - -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ - -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ - -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ - -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ - -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ - -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ - -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ - -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ - -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ - < $(srcdir)/stdint.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ - -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ - -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ - -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ - -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ - -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ - -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ - -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ - -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ - -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ - -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ - -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ - -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ - -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ - -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ - -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ - -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ - -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ - -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ - -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ - -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ - -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ - -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ - -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ - -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ - -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ - -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ - -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ - -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ - -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ - -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ - -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \ - -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ - -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ - -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ - -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ - -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ - -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ - < $(srcdir)/stdio.in.h | \ - sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ - -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ - -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ - -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ - -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ - -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ - -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ - -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ - -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ - -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ - -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ - -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ - -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ - -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ - -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ - -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ - -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ - -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ - -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ - -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ - -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ - -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ - -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ - -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ - -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ - -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ - -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ - -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ - -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ - -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ - -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ - -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ - -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ - -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ - -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ - -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ - -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ - -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ - -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ - -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ - -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ - -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ - -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ - -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ - -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ - -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \ - -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ - -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ - -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ - -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ - -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \ - -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ - -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \ - -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ - -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \ - -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \ - -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ - -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \ - -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \ - -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ - -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ - -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ - -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \ - -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \ - -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \ - -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ - -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ - -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ - -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \ - -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \ - -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ - -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \ - < $(srcdir)/stdlib.in.h | \ - sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ - -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ - -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ - -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ - -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ - -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ - -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ - -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ - -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ - -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ - -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ - -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ - -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ - -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ - -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ - -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ - -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ - -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ - -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ - -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ - -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ - -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ - -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ - -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ - -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ - -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ - -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ - -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ - -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ - -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ - -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ - -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# has one that is incomplete. -sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ - -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \ - -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \ - -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \ - -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \ - -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \ - -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \ - -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \ - -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \ - -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \ - -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \ - -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \ - -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \ - -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ - -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ - -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ - -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ - -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ - -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ - -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ - -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ - -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ - -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ - -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ - -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ - -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ - -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ - -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ - -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ - -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ - -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ - -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ - -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_stat.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ - -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \ - -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \ - -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \ - -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \ - -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \ - -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ - -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ - -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ - -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ - -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ - -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ - -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ - -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ - -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/time.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create an empty placeholder for -# when the system doesn't have one. -unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ - -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ - -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ - -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ - -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \ - -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ - -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ - -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \ - -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ - -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \ - -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ - -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ - -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ - -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ - -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ - -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ - -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ - -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \ - -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ - -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ - -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ - -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ - -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ - -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ - -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ - -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \ - -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \ - -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \ - -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \ - -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ - -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \ - -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \ - -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ - -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \ - -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \ - -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \ - -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ - -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ - -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \ - -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ - -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ - -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ - < $(srcdir)/unistd.in.h | \ - sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ - -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ - -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ - -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ - -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ - -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ - -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ - -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ - -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ - -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ - -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ - -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ - -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ - -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ - -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ - -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ - -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ - -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ - -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ - -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ - -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ - -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ - -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ - -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ - -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ - -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ - -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ - -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ - -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ - -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ - -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ - -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ - -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ - -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ - -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ - -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ - -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ - | \ - sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ - -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ - -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ - -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ - -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ - -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ - -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ - -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ - -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ - -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ - -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ - -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ - -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ - -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ - -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ - -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ - -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ - -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ - -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ - -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ - -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ - -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ - -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ - -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ - -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -# The warn-on-use.h that gets inserted into generated .h files is the same as -# build-aux/warn-on-use.h, except that it has the copyright header cut off. -warn-on-use.h: $(top_srcdir)/./warn-on-use.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/^.ifndef/,$$p' \ - < $(top_srcdir)/./warn-on-use.h \ - > $@-t && \ - mv $@-t $@ - -mostlyclean-local: mostlyclean-generic - @for dir in '' $(MOSTLYCLEANDIRS); do \ - if test -n "$$dir" && test -d $$dir; then \ - echo "rmdir $$dir"; rmdir $$dir; \ - fi; \ - done; \ - : - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/config.in b/src/config.in deleted file mode 100644 index b24aacd4e54..00000000000 --- a/src/config.in +++ /dev/null @@ -1,1400 +0,0 @@ -/* src/config.in. Generated from configure.in by autoheader. */ - -/* GNU Emacs site configuration template file. - -Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2011 - Free Software Foundation, Inc. - -This file is part of GNU Emacs. - -GNU Emacs is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -GNU Emacs is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Emacs. If not, see . */ - - -/* No code in Emacs #includes config.h twice, but some bits of code - intended to work with other packages as well (like gmalloc.c) - think they can include it as many times as they like. */ -#ifndef EMACS_CONFIG_H -#define EMACS_CONFIG_H - - -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - -/* Define to the number of bits in type 'ptrdiff_t'. */ -#undef BITSIZEOF_PTRDIFF_T - -/* Define to the number of bits in type 'sig_atomic_t'. */ -#undef BITSIZEOF_SIG_ATOMIC_T - -/* Define to the number of bits in type 'size_t'. */ -#undef BITSIZEOF_SIZE_T - -/* Define to the number of bits in type 'wchar_t'. */ -#undef BITSIZEOF_WCHAR_T - -/* Define to the number of bits in type 'wint_t'. */ -#undef BITSIZEOF_WINT_T - -/* Define if Emacs cannot be dumped on your system. */ -#undef CANNOT_DUMP - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -#undef CRAY_STACKSEG_END - -/* Define to 1 if using `alloca.c'. */ -#undef C_ALLOCA - -/* Define to 1 for DGUX with . */ -#undef DGUX - -/* Define to 1 if you are using the GNU C Library. */ -#undef DOUG_LEA_MALLOC - -/* Define to the canonical Emacs configuration name. */ -#undef EMACS_CONFIGURATION - -/* Define to the options passed to configure. */ -#undef EMACS_CONFIG_OPTIONS - -/* Enable expensive run-time checking of data types? */ -#undef ENABLE_CHECKING - -/* Define this to check for errors in cons list. */ -#undef GC_CHECK_CONS_LIST - -/* Define this temporarily to hunt a bug. If defined, the size of strings is - redundantly recorded in sdata structures so that it can be compared to the - sizes recorded in Lisp strings. */ -#undef GC_CHECK_STRING_BYTES - -/* Define this to check the string free list. */ -#undef GC_CHECK_STRING_FREE_LIST - -/* Define this to check for short string overrun. */ -#undef GC_CHECK_STRING_OVERRUN - -/* Define to 1 if the `getpgrp' function requires zero arguments. */ -#undef GETPGRP_VOID - -/* Define to 1 if gettimeofday accepts only one argument. */ -#undef GETTIMEOFDAY_ONE_ARGUMENT - -/* Define to 1 if you want to use the GNU memory allocator. */ -#undef GNU_MALLOC - -/* Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists. */ -#undef HAVE_AIX_SMT_EXP - -/* Define to 1 if you have the `alarm' function. */ -#undef HAVE_ALARM - -/* Define to 1 if you have `alloca', as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#undef HAVE_ALLOCA_H - -/* Define to 1 if ALSA is available. */ -#undef HAVE_ALSA - -/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */ -#undef HAVE_ATTRIBUTE_ALIGNED - -/* Define to 1 if strtold conforms to C99. */ -#undef HAVE_C99_STRTOLD - -/* Define to 1 if you have the `cbrt' function. */ -#undef HAVE_CBRT - -/* Define to 1 if you have the `cfmakeraw' function. */ -#undef HAVE_CFMAKERAW - -/* Define to 1 if you have the `cfsetspeed' function. */ -#undef HAVE_CFSETSPEED - -/* Define to 1 if you have the `closedir' function. */ -#undef HAVE_CLOSEDIR - -/* Define to 1 if you have the header file. */ -#undef HAVE_COFF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_COM_ERR_H - -/* Define to 1 if you have the `copysign' function. */ -#undef HAVE_COPYSIGN - -/* Define to 1 if using D-Bus. */ -#undef HAVE_DBUS - -/* Define to 1 if you have the `dbus_watch_get_unix_fd' function. */ -#undef HAVE_DBUS_WATCH_GET_UNIX_FD - -/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. - */ -#undef HAVE_DECL_GETENV - -/* Define to 1 if you have the declaration of `localtime_r', and to 0 if you - don't. */ -#undef HAVE_DECL_LOCALTIME_R - -/* Define to 1 if you have the declaration of `strmode', and to 0 if you - don't. */ -#undef HAVE_DECL_STRMODE - -/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you - don't. */ -#undef HAVE_DECL_SYS_SIGLIST - -/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. - */ -#undef HAVE_DECL_TZNAME - -/* Define to 1 if you have the declaration of `__sys_siglist', and to 0 if you - don't. */ -#undef HAVE_DECL___SYS_SIGLIST - -/* Define to 1 if you have the header file. */ -#undef HAVE_DES_H - -/* Define to 1 if dynamic ptys are supported. */ -#undef HAVE_DEV_PTMX - -/* Define to 1 if you have the `difftime' function. */ -#undef HAVE_DIFFTIME - -/* Define to 1 if you have the header file. */ -#undef HAVE_DIRENT_H - -/* Define to 1 if you have the `dup2' function. */ -#undef HAVE_DUP2 - -/* Define to 1 if you have the `euidaccess' function. */ -#undef HAVE_EUIDACCESS - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the `fmod' function. */ -#undef HAVE_FMOD - -/* Define to 1 if you have the `fork' function. */ -#undef HAVE_FORK - -/* Define to 1 if you have the `fpathconf' function. */ -#undef HAVE_FPATHCONF - -/* Define to 1 if using the freetype and fontconfig libraries. */ -#undef HAVE_FREETYPE - -/* Define to 1 if you have the `frexp' function. */ -#undef HAVE_FREXP - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#undef HAVE_FSEEKO - -/* Define to 1 if you have the `fsync' function. */ -#undef HAVE_FSYNC - -/* Define to 1 if you have the `ftime' function. */ -#undef HAVE_FTIME - -/* Define to 1 if you have the `gai_strerror' function. */ -#undef HAVE_GAI_STRERROR - -/* Define to 1 if using GConf. */ -#undef HAVE_GCONF - -/* Define to 1 if you have the `getaddrinfo' function. */ -#undef HAVE_GETADDRINFO - -/* Define to 1 if you have the `getcwd' function. */ -#undef HAVE_GETCWD - -/* Define to 1 if you have the `getdelim' function. */ -#undef HAVE_GETDELIM - -/* Define to 1 if you have the `getdomainname' function. */ -#undef HAVE_GETDOMAINNAME - -/* Define to 1 if you have the `gethostname' function. */ -#undef HAVE_GETHOSTNAME - -/* Define to 1 if you have the `getline' function. */ -#undef HAVE_GETLINE - -/* Define to 1 if you have the header file. */ -#undef HAVE_GETOPT_H - -/* Define to 1 if you have the `getopt_long_only' function. */ -#undef HAVE_GETOPT_LONG_ONLY - -/* Define to 1 if you have the `getpagesize' function. */ -#undef HAVE_GETPAGESIZE - -/* Define to 1 if you have the `getpeername' function. */ -#undef HAVE_GETPEERNAME - -/* Define to 1 if you have the `getpt' function. */ -#undef HAVE_GETPT - -/* Define to 1 if you have the `getrlimit' function. */ -#undef HAVE_GETRLIMIT - -/* Define to 1 if you have the `getrusage' function. */ -#undef HAVE_GETRUSAGE - -/* Define to 1 if you have the `getsockname' function. */ -#undef HAVE_GETSOCKNAME - -/* Define to 1 if you have the `getsockopt' function. */ -#undef HAVE_GETSOCKOPT - -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define to 1 if you have the `getwd' function. */ -#undef HAVE_GETWD - -/* Define to 1 if you have the `get_current_dir_name' function. */ -#undef HAVE_GET_CURRENT_DIR_NAME - -/* Define to 1 if you have a gif (or ungif) library. */ -#undef HAVE_GIF - -/* Define if using GnuTLS. */ -#undef HAVE_GNUTLS - -/* Define to 1 if you have the gpm library (-lgpm). */ -#undef HAVE_GPM - -/* Define to 1 if you have the `grantpt' function. */ -#undef HAVE_GRANTPT - -/* Define to 1 if using GTK 3 or later. */ -#undef HAVE_GTK3 - -/* Define to 1 if you have the `gtk_adjustment_get_page_size' function. */ -#undef HAVE_GTK_ADJUSTMENT_GET_PAGE_SIZE - -/* Define to 1 if you have GTK and pthread (-lpthread). */ -#undef HAVE_GTK_AND_PTHREAD - -/* Define to 1 if you have the `gtk_dialog_get_action_area' function. */ -#undef HAVE_GTK_DIALOG_GET_ACTION_AREA - -/* Define to 1 if you have the `gtk_file_selection_new' function. */ -#undef HAVE_GTK_FILE_SELECTION_NEW - -/* Define to 1 if you have the `gtk_main' function. */ -#undef HAVE_GTK_MAIN - -/* Define to 1 if you have the `gtk_orientable_set_orientation' function. */ -#undef HAVE_GTK_ORIENTABLE_SET_ORIENTATION - -/* Define to 1 if you have the `gtk_widget_get_mapped' function. */ -#undef HAVE_GTK_WIDGET_GET_MAPPED - -/* Define to 1 if you have the `gtk_widget_get_sensitive' function. */ -#undef HAVE_GTK_WIDGET_GET_SENSITIVE - -/* Define to 1 if you have the `gtk_widget_get_window' function. */ -#undef HAVE_GTK_WIDGET_GET_WINDOW - -/* Define to 1 if you have the `gtk_widget_set_has_window' function. */ -#undef HAVE_GTK_WIDGET_SET_HAS_WINDOW - -/* Define to 1 if you have the `g_type_init' function. */ -#undef HAVE_G_TYPE_INIT - -/* Define to 1 if netdb.h declares h_errno. */ -#undef HAVE_H_ERRNO - -/* Define to 1 if using imagemagick. */ -#undef HAVE_IMAGEMAGICK - -/* Define to 1 if you have inet sockets. */ -#undef HAVE_INET_SOCKETS - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `isnan' function. */ -#undef HAVE_ISNAN - -/* Define to 1 if you have the jpeg library (-ljpeg). */ -#undef HAVE_JPEG - -/* Define to 1 if you have the header file. */ -#undef HAVE_KERBEROSIV_DES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_KERBEROSIV_KRB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_KERBEROS_DES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_KERBEROS_KRB_H - -/* Define to 1 if `e_text' is a member of `krb5_error'. */ -#undef HAVE_KRB5_ERROR_E_TEXT - -/* Define to 1 if `text' is a member of `krb5_error'. */ -#undef HAVE_KRB5_ERROR_TEXT - -/* Define to 1 if you have the header file. */ -#undef HAVE_KRB5_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_KRB_H - -/* Define if you have and nl_langinfo(CODESET). */ -#undef HAVE_LANGINFO_CODESET - -/* Define to 1 if you have the `com_err' library (-lcom_err). */ -#undef HAVE_LIBCOM_ERR - -/* Define to 1 if you have the `crypto' library (-lcrypto). */ -#undef HAVE_LIBCRYPTO - -/* Define to 1 if you have the `des' library (-ldes). */ -#undef HAVE_LIBDES - -/* Define to 1 if you have the `des425' library (-ldes425). */ -#undef HAVE_LIBDES425 - -/* Define to 1 if you have the `dgc' library (-ldgc). */ -#undef HAVE_LIBDGC - -/* Define to 1 if you have the `dnet' library (-ldnet). */ -#undef HAVE_LIBDNET - -/* Define to 1 if you have the hesiod library (-lhesiod). */ -#undef HAVE_LIBHESIOD - -/* Define to 1 if you have the `intl' library (-lintl). */ -#undef HAVE_LIBINTL - -/* Define to 1 if you have the `k5crypto' library (-lk5crypto). */ -#undef HAVE_LIBK5CRYPTO - -/* Define to 1 if you have the `krb' library (-lkrb). */ -#undef HAVE_LIBKRB - -/* Define to 1 if you have the `krb4' library (-lkrb4). */ -#undef HAVE_LIBKRB4 - -/* Define to 1 if you have the `krb5' library (-lkrb5). */ -#undef HAVE_LIBKRB5 - -/* Define to 1 if you have the `kstat' library (-lkstat). */ -#undef HAVE_LIBKSTAT - -/* Define to 1 if you have the `lockfile' library (-llockfile). */ -#undef HAVE_LIBLOCKFILE - -/* Define to 1 if you have the `m' library (-lm). */ -#undef HAVE_LIBM - -/* Define to 1 if you have the `mail' library (-lmail). */ -#undef HAVE_LIBMAIL - -/* Define to 1 if you have the `ncurses' library (-lncurses). */ -#undef HAVE_LIBNCURSES - -/* Define to 1 if using libotf. */ -#undef HAVE_LIBOTF - -/* Define to 1 if you have the `perfstat' library (-lperfstat). */ -#undef HAVE_LIBPERFSTAT - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBPNG_PNG_H - -/* Define to 1 if you have the `pthreads' library (-lpthreads). */ -#undef HAVE_LIBPTHREADS - -/* Define to 1 if you have the resolv library (-lresolv). */ -#undef HAVE_LIBRESOLV - -/* Define to 1 if using SELinux. */ -#undef HAVE_LIBSELINUX - -/* Define to 1 if you have the `Xext' library (-lXext). */ -#undef HAVE_LIBXEXT - -/* Define to 1 if you have the libxml library (-lxml2). */ -#undef HAVE_LIBXML2 - -/* Define to 1 if you have the `Xmu' library (-lXmu). */ -#undef HAVE_LIBXMU - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_VERSION_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define to 1 if you have the `localtime_r' function. */ -#undef HAVE_LOCALTIME_R - -/* Define to 1 if you have the `logb' function. */ -#undef HAVE_LOGB - -/* Define to 1 if you support file names longer than 14 characters. */ -#undef HAVE_LONG_FILE_NAMES - -/* Define to 1 if the system has the type `long long int'. */ -#undef HAVE_LONG_LONG_INT - -/* Define to 1 if you have the `lrand48' function. */ -#undef HAVE_LRAND48 - -/* Define to 1 if you have the `lstat' function. */ -#undef HAVE_LSTAT - -/* Define to 1 if using libm17n-flt. */ -#undef HAVE_M17N_FLT - -/* Define to 1 if you have the header file. */ -#undef HAVE_MACHINE_SOUNDCARD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MACH_MACH_H - -/* Define to 1 if you have the `MagickExportImagePixels' function. */ -#undef HAVE_MAGICKEXPORTIMAGEPIXELS - -/* Define to 1 if you have the header file. */ -#undef HAVE_MAILLOCK_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MALLOC_MALLOC_H - -/* Define to 1 if you have the `mblen' function. */ -#undef HAVE_MBLEN - -/* Define to 1 if you have the `mbrlen' function. */ -#undef HAVE_MBRLEN - -/* Define to 1 if you have the `mbsinit' function. */ -#undef HAVE_MBSINIT - -/* Define to 1 if declares mbstate_t. */ -#undef HAVE_MBSTATE_T - -/* Define to 1 if you have the `memcmp' function. */ -#undef HAVE_MEMCMP - -/* Define to 1 if you have the `memcpy' function. */ -#undef HAVE_MEMCPY - -/* Define to 1 if you have the `memmove' function. */ -#undef HAVE_MEMMOVE - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `mempcpy' function. */ -#undef HAVE_MEMPCPY - -/* Define to 1 if you have the `memset' function. */ -#undef HAVE_MEMSET - -/* Define to 1 if you have mouse menus. (This is automatic if you use X, but - the option to specify it remains.) It is also defined with other window - systems that support xmenu.c. */ -#undef HAVE_MENUS - -/* Define to 1 if you have the `mkdir' function. */ -#undef HAVE_MKDIR - -/* Define to 1 if you have the `mkstemp' function. */ -#undef HAVE_MKSTEMP - -/* Define to 1 if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if you have mouse support. */ -#undef HAVE_MOUSE - -/* Define to 1 if you have the `mremap' function. */ -#undef HAVE_MREMAP - -/* Define to 1 if you have the header file. */ -#undef HAVE_NET_IF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NLIST_H - -/* Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on - Mac OS X. */ -#undef HAVE_NS - -/* Define to 1 if libotf has OTF_get_variation_glyphs. */ -#undef HAVE_OTF_GET_VARIATION_GLYPHS - -/* Define to 1 if personality LINUX32 can be set. */ -#undef HAVE_PERSONALITY_LINUX32 - -/* Define to 1 if you have the png library (-lpng). */ -#undef HAVE_PNG - -/* Define to 1 if you have the header file. */ -#undef HAVE_PNG_H - -/* Define to 1 if you have the `posix_memalign' function. */ -#undef HAVE_POSIX_MEMALIGN - -/* Define to 1 if you have the `pstat_getdynamic' function. */ -#undef HAVE_PSTAT_GETDYNAMIC - -/* Define to 1 if you have the header file. */ -#undef HAVE_PTHREAD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_PTY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_PWD_H - -/* Define to 1 if you have the `random' function. */ -#undef HAVE_RANDOM - -/* Define to 1 if you have the `readlink' function. */ -#undef HAVE_READLINK - -/* Define to 1 if you have the `recvfrom' function. */ -#undef HAVE_RECVFROM - -/* Define to 1 if you have the `rename' function. */ -#undef HAVE_RENAME - -/* Define to 1 if res_init is available. */ -#undef HAVE_RES_INIT - -/* Define to 1 if you have the `rint' function. */ -#undef HAVE_RINT - -/* Define to 1 if you have the `rmdir' function. */ -#undef HAVE_RMDIR - -/* Define to 1 if using librsvg. */ -#undef HAVE_RSVG - -/* Define to 1 if you have the `select' function. */ -#undef HAVE_SELECT - -/* Define to 1 if you have the `sendto' function. */ -#undef HAVE_SENDTO - -/* Define to 1 if you have the `setitimer' function. */ -#undef HAVE_SETITIMER - -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define to 1 if you have the `setpgid' function. */ -#undef HAVE_SETPGID - -/* Define to 1 if you have the `setrlimit' function. */ -#undef HAVE_SETRLIMIT - -/* Define to 1 if you have the `setsid' function. */ -#undef HAVE_SETSID - -/* Define to 1 if you have the `setsockopt' function. */ -#undef HAVE_SETSOCKOPT - -/* Define to 1 if you have the `shutdown' function. */ -#undef HAVE_SHUTDOWN - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -#undef HAVE_SIGNED_SIG_ATOMIC_T - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -#undef HAVE_SIGNED_WCHAR_T - -/* Define to 1 if 'wint_t' is a signed integer type. */ -#undef HAVE_SIGNED_WINT_T - -/* Define to 1 if the system has the type `size_t'. */ -#undef HAVE_SIZE_T - -/* Define to 1 if you have sound support. */ -#undef HAVE_SOUND - -/* Define to 1 if you have the header file. */ -#undef HAVE_SOUNDCARD_H - -/* Define to 1 if `speed_t' is declared by . */ -#undef HAVE_SPEED_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDIO_EXT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strchr' function. */ -#undef HAVE_STRCHR - -/* Define to 1 if you have the `strerror' function. */ -#undef HAVE_STRERROR - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strrchr' function. */ -#undef HAVE_STRRCHR - -/* Define to 1 if you have the `strsignal' function. */ -#undef HAVE_STRSIGNAL - -/* Define to 1 if `ifr_addr' is a member of `struct ifreq'. */ -#undef HAVE_STRUCT_IFREQ_IFR_ADDR - -/* Define to 1 if `ifr_broadaddr' is a member of `struct ifreq'. */ -#undef HAVE_STRUCT_IFREQ_IFR_BROADADDR - -/* Define to 1 if `ifr_flags' is a member of `struct ifreq'. */ -#undef HAVE_STRUCT_IFREQ_IFR_FLAGS - -/* Define to 1 if `ifr_hwaddr' is a member of `struct ifreq'. */ -#undef HAVE_STRUCT_IFREQ_IFR_HWADDR - -/* Define to 1 if `ifr_netmask' is a member of `struct ifreq'. */ -#undef HAVE_STRUCT_IFREQ_IFR_NETMASK - -/* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */ -#undef HAVE_STRUCT_NLIST_N_UN_N_NAME - -/* Define to 1 if `tm_zone' is a member of `struct tm'. */ -#undef HAVE_STRUCT_TM_TM_ZONE - -/* Define to 1 if `struct utimbuf' is declared by . */ -#undef HAVE_STRUCT_UTIMBUF - -/* Define if struct stat has an st_dm_mode member. */ -#undef HAVE_ST_DM_MODE - -/* Define to 1 if you have the `symlink' function. */ -#undef HAVE_SYMLINK - -/* Define to 1 if you have the `sync' function. */ -#undef HAVE_SYNC - -/* Define to 1 if you have the `sysinfo' function. */ -#undef HAVE_SYSINFO - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_BITYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_LOADAVG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_MMAN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_RESOURCE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOUNDCARD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SYSTEMINFO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UTSNAME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_VLIMIT_H - -/* Define to 1 if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS__MBSTATE_T_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TERM_H - -/* Define to 1 if you have the tiff library (-ltiff). */ -#undef HAVE_TIFF - -/* Define to 1 if `struct timeval' is declared by . */ -#undef HAVE_TIMEVAL - -/* Define if struct tm has the tm_gmtoff member. */ -#undef HAVE_TM_GMTOFF - -/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use - `HAVE_STRUCT_TM_TM_ZONE' instead. */ -#undef HAVE_TM_ZONE - -/* Define to 1 if you have the `touchlock' function. */ -#undef HAVE_TOUCHLOCK - -/* Define to 1 if you don't have `tm_zone' but do have the external array - `tzname'. */ -#undef HAVE_TZNAME - -/* Define to 1 if you have the `tzset' function. */ -#undef HAVE_TZSET - -/* Define to 1 if you have the `ualarm' function. */ -#undef HAVE_UALARM - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if the system has the type `unsigned long long int'. */ -#undef HAVE_UNSIGNED_LONG_LONG_INT - -/* Define to 1 if you have the header file. */ -#undef HAVE_UTIL_H - -/* Define to 1 if you have the `utimes' function. */ -#undef HAVE_UTIMES - -/* Define to 1 if you have the header file. */ -#undef HAVE_UTIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UTMP_H - -/* Define to 1 if you have the `vfork' function. */ -#undef HAVE_VFORK - -/* Define to 1 if you have the header file. */ -#undef HAVE_VFORK_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_WCHAR_H - -/* Define if you have the 'wchar_t' type. */ -#undef HAVE_WCHAR_T - -/* Define if you have a window system. */ -#undef HAVE_WINDOW_SYSTEM - -/* Define to 1 if `fork' works. */ -#undef HAVE_WORKING_FORK - -/* Define to 1 if `vfork' works. */ -#undef HAVE_WORKING_VFORK - -/* Define to 1 if you have the header file. */ -#undef HAVE_WS2TCPIP_H - -/* Define to 1 if you want to use version 11 of X windows. Otherwise, Emacs - expects to use version 10. */ -#undef HAVE_X11 - -/* Define to 1 if you have the X11R6 or newer version of Xlib. */ -#undef HAVE_X11R6 - -/* Define if you have usable X11R6-style XIM support. */ -#undef HAVE_X11R6_XIM - -/* Define to 1 if you have the X11R6 or newer version of Xt. */ -#undef HAVE_X11XTR6 - -/* Define to 1 if you have the Xaw3d library (-lXaw3d). */ -#undef HAVE_XAW3D - -/* Define to 1 if you have the Xft library. */ -#undef HAVE_XFT - -/* Define to 1 if XIM is available */ -#undef HAVE_XIM - -/* Define to 1 if you have the XkbGetKeyboard function. */ -#undef HAVE_XKBGETKEYBOARD - -/* Define to 1 if you have the Xpm libary (-lXpm). */ -#undef HAVE_XPM - -/* Define to 1 if you have the `XrmSetDatabase' function. */ -#undef HAVE_XRMSETDATABASE - -/* Define to 1 if you have the `XScreenNumberOfScreen' function. */ -#undef HAVE_XSCREENNUMBEROFSCREEN - -/* Define to 1 if you have the `XScreenResourceString' function. */ -#undef HAVE_XSCREENRESOURCESTRING - -/* Define to 1 if you have the `XSetWMProtocols' function. */ -#undef HAVE_XSETWMPROTOCOLS - -/* Define if you have usable i18n support. */ -#undef HAVE_X_I18N - -/* Define to 1 if you have the SM library (-lSM). */ -#undef HAVE_X_SM - -/* Define to 1 if you want to use the X window system. */ -#undef HAVE_X_WINDOWS - -/* Define to 1 if the system has the type `_Bool'. */ -#undef HAVE__BOOL - -/* Define to 1 if you have the `__builtin_unwind_init' function. */ -#undef HAVE___BUILTIN_UNWIND_INIT - -/* Define to 1 if you have the `__executable_start' function. */ -#undef HAVE___EXECUTABLE_START - -/* Define to 1 if you have the `__fpending' function. */ -#undef HAVE___FPENDING - -/* Define to support using a Hesiod database to find the POP server. */ -#undef HESIOD - -/* Define to support Kerberos-authenticated POP mail retrieval. */ -#undef KERBEROS - -/* Define to use Kerberos 5 instead of Kerberos 4. */ -#undef KERBEROS5 - -/* Define to 1 if localtime caches TZ. */ -#undef LOCALTIME_CACHE - -/* Define to 1 if `lstat' dereferences a symlink specified with a trailing - slash. */ -#undef LSTAT_FOLLOWS_SLASHED_SYMLINK - -/* String giving fallback POP mail host. */ -#undef MAILHOST - -/* Define to unlink, rather than empty, mail spool after reading. */ -#undef MAIL_UNLINK_SPOOL - -/* Define if the mailer uses flock to interlock the mail spool. */ -#undef MAIL_USE_FLOCK - -/* Define if the mailer uses lockf to interlock the mail spool. */ -#undef MAIL_USE_LOCKF - -/* Define to support MMDF mailboxes in movemail. */ -#undef MAIL_USE_MMDF - -/* Define to support POP mail retrieval. */ -#undef MAIL_USE_POP - -/* Define to 1 if you don't have struct exception in math.h. */ -#undef NO_MATHERR - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* Define to 1 if `NSInteger' is defined. */ -#undef NS_HAVE_NSINTEGER - -/* Define to 1 if you are using NS windowing under MacOS X. */ -#undef NS_IMPL_COCOA - -/* Define to 1 if you are using NS windowing under GNUstep. */ -#undef NS_IMPL_GNUSTEP - -/* Define to 1 if the nlist n_name member is a pointer */ -#undef N_NAME_POINTER - -/* Define if the C compiler is the linker. */ -#undef ORDINARY_LINK - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define as `void' if your compiler accepts `void *'; otherwise define as - `char'. */ -#undef POINTER_TYPE - -/* Define to 1 if the C compiler supports function prototypes. */ -#undef PROTOTYPES - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -#undef PTRDIFF_T_SUFFIX - -/* Define to 1 if readlink fails to recognize a trailing slash. */ -#undef READLINK_TRAILING_SLASH_BUG - -/* Define REL_ALLOC if you want to use the relocating allocator for buffer - space. */ -#undef REL_ALLOC - -/* Define to 1 if stat needs help when passed a directory name with a trailing - slash */ -#undef REPLACE_FUNC_STAT_DIR - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -#undef REPLACE_FUNC_STAT_FILE - -/* Define as the return type of signal handlers (`int' or `void'). */ -#undef RETSIGTYPE - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -#undef SIG_ATOMIC_T_SUFFIX - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -#undef SIZE_T_SUFFIX - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -#undef STACK_DIRECTION - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -#undef STAT_MACROS_BROKEN - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 on System V Release 4. */ -#undef SVR4 - -/* Process async input synchronously. */ -#undef SYNC_INPUT - -/* Define to use system malloc. */ -#undef SYSTEM_MALLOC - -/* Define to 1 if you use terminfo instead of termcap. */ -#undef TERMINFO - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define to 1 if your declares `struct tm'. */ -#undef TM_IN_SYS_TIME - -/* Define to 1 for Encore UMAX. */ -#undef UMAX - -/* Define to 1 for Encore UMAX 4.3 that has instead of - . */ -#undef UMAX4_3 - -/* Define to 1 if using GTK. */ -#undef USE_GTK - -/* Define this to use a lisp union for the Lisp_Object data type. */ -#undef USE_LISP_UNION_TYPE - -/* Define to 1 if using the Lucid X toolkit. */ -#undef USE_LUCID - -/* Define to use mmap to allocate buffer text. */ -#undef USE_MMAP_FOR_BUFFERS - -/* Define to 1 if using the Motif X toolkit. */ -#undef USE_MOTIF - -/* Define to 1 if we should use toolkit scroll bars. */ -#undef USE_TOOLKIT_SCROLL_BARS - -/* Define to 1 if we should use XIM, if it is available. */ -#undef USE_XIM - -/* Define to 1 if using an X toolkit. */ -#undef USE_X_TOOLKIT - -/* Version number of package */ -#undef VERSION - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -#undef WCHAR_T_SUFFIX - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -#undef WINT_T_SUFFIX - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif - -/* Define this to check for malloc buffer overrun. */ -#undef XMALLOC_OVERRUN_CHECK - -/* Define to the type of the 6th arg of XRegisterIMInstantiateCallback, either - XPointer or XPointer*. */ -#undef XRegisterIMInstantiateCallback_arg6 - -/* Number of bits in a file offset, on hosts where this is settable. */ -#undef _FILE_OFFSET_BITS - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -#undef _LARGEFILE_SOURCE - -/* Define for large files, on AIX-style hosts. */ -#undef _LARGE_FILES - -/* Define to 1 if on MINIX. */ -#undef _MINIX - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#undef _POSIX_1_SOURCE - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE - -/* Define to 500 only on HP-UX. */ -#undef _XOPEN_SOURCE - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#undef __GETOPT_PREFIX - -/* Define like PROTOTYPES; this can be used by system headers. */ -#undef __PROTOTYPES - -/* Define to compiler's equivalent of C99 restrict keyword in array - declarations. Define as empty for no equivalent. */ -#undef __restrict_arr - -/* Define to the used machine dependent file. */ -#undef config_machfile - -/* Define to the used os dependent file. */ -#undef config_opsysfile - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for MacOS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* Define to a type if does not define. */ -#undef mbstate_t - -/* Define to the name of the strftime replacement function. */ -#undef my_strftime - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#undef nlink_t - -/* Define to `int' if does not define. */ -#undef pid_t - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#undef restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to `unsigned int' if does not define. */ -#undef size_t - -/* type to use in place of socklen_t if not defined */ -#undef socklen_t - -/* Define to any substitute for sys_siglist. */ -#undef sys_siglist - -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_UNUSED -#endif -/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name - is a misnomer outside of parameter lists. */ -#define _UNUSED_PARAMETER_ _GL_UNUSED - - -/* Define as `fork' if `vfork' does not work. */ -#undef vfork - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -#undef volatile - - -/* Define AMPERSAND_FULL_NAME if you use the convention - that & in the full name stands for the login id. */ -/* Turned on June 1996 supposing nobody will mind it. */ -#define AMPERSAND_FULL_NAME - -/* If using GNU, then support inline function declarations. */ -/* Don't try to switch on inline handling as detected by AC_C_INLINE - generally, because even if non-gcc compilers accept `inline', they - may reject `extern inline'. */ -#if defined (__GNUC__) -#define INLINE __inline__ -#else -#define INLINE -#endif - -/* `subprocesses' should be defined if you want to - have code for asynchronous subprocesses - (as used in M-x compile and M-x shell). - Only MSDOS does not support this (it overrides - this in its config_opsysfile below). */ - -#define subprocesses - -/* Include the os and machine dependent files. */ -#include config_opsysfile -#ifdef config_machfile -# include config_machfile -#endif - -/* GNUstep needs a bit more pure memory. Of the existing knobs, - SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. - (There is probably a better place to do this, but right now the - Cocoa side does this in s/darwin.h and we cannot parallel this - exactly since GNUstep is multi-OS. */ -#if defined HAVE_NS && defined NS_IMPL_GNUSTEP -# define SYSTEM_PURESIZE_EXTRA 30000 -#endif - -/* SIGTYPE is the macro we actually use. */ -#ifndef SIGTYPE -#define SIGTYPE RETSIGTYPE -#endif - -#ifdef emacs /* Don't do this for lib-src. */ -/* Tell regex.c to use a type compatible with Emacs. */ -#define RE_TRANSLATE_TYPE Lisp_Object -#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C) -#ifdef make_number -/* If make_number is a macro, use it. */ -#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0))) -#else -/* If make_number is a function, avoid it. */ -#define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0)) -#endif -#endif - -/* These default definitions are good for almost all machines. - The exceptions override them in m/MACHINE.h. */ - -#ifndef BITS_PER_CHAR -#define BITS_PER_CHAR 8 -#endif - -#ifndef BITS_PER_SHORT -#define BITS_PER_SHORT 16 -#endif - -/* Note that lisp.h uses this in a preprocessor conditional, so it - would not work to use sizeof. That being so, we do all of them - without sizeof, for uniformity's sake. */ -#ifndef BITS_PER_INT -#define BITS_PER_INT 32 -#endif - -#ifndef BITS_PER_LONG -#ifdef _LP64 -#define BITS_PER_LONG 64 -#else -#define BITS_PER_LONG 32 -#endif -#endif - -/* Define if the compiler supports function prototypes. It may do so but - not define __STDC__ (e.g. DEC C by default) or may define it as zero. */ -#undef PROTOTYPES - -#include -#include - -#ifdef HAVE_ALLOCA_H -# include -#elif defined __GNUC__ -# define alloca __builtin_alloca -#elif defined _AIX -# define alloca __alloca -#else -# include -# ifdef __cplusplus -extern "C" -# endif -void *alloca (size_t); -#endif - -#ifndef HAVE_SIZE_T -typedef unsigned size_t; -#endif - -#ifndef HAVE_STRCHR -#define strchr(a, b) index (a, b) -#endif - -#ifndef HAVE_STRRCHR -#define strrchr(a, b) rindex (a, b) -#endif - -#if defined __GNUC__ && (__GNUC__ > 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) -#define NO_RETURN __attribute__ ((__noreturn__)) -#else -#define NO_RETURN /* nothing */ -#endif - -#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ -#define NO_INLINE __attribute__((noinline)) -#else -#define NO_INLINE -#endif - -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) -#define EXTERNALLY_VISIBLE __attribute__((externally_visible)) -#else -#define EXTERNALLY_VISIBLE -#endif - -/* Some versions of GNU/Linux define noinline in their headers. */ -#ifdef noinline -#undef noinline -#endif - -/* These won't be used automatically yet. We also need to know, at least, - that the stack is continuous. */ -#ifdef __GNUC__ -# ifndef GC_SETJMP_WORKS - /* GC_SETJMP_WORKS is nearly always appropriate for GCC. */ -# define GC_SETJMP_WORKS 1 -# endif -# ifndef GC_LISP_OBJECT_ALIGNMENT -# define GC_LISP_OBJECT_ALIGNMENT (__alignof__ (Lisp_Object)) -# endif -#endif - -#endif /* EMACS_CONFIG_H */ - -/* -Local Variables: -mode: c -End: -*/ - From 927c53e762b4134a959bdad6df4d4ea6befe84b6 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 22 Mar 2011 19:50:28 -0700 Subject: [PATCH 083/166] * lisp/progmodes/gdb-mi.el (gdb): Fix typo in previous change. --- lisp/ChangeLog | 4 ++++ lisp/progmodes/gdb-mi.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e508174e118..adfbc6ce440 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-23 Glenn Morris + + * progmodes/gdb-mi.el (gdb): Fix typo in previous change. + 2011-03-22 Juanma Barranquero * emacs-lisp/derived.el (define-derived-mode): Wrap declaration of diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index ab315f9eefd..6aece579d5d 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -648,7 +648,7 @@ detailed description of this mode. (set (make-local-variable 'gud-minor-mode) 'gdbmi) (setq comint-input-sender 'gdb-send) (when (ring-empty-p comint-input-ring) ; cf shell-mode - (let ((hfile (expand-file-name (or (getenv "GBDHISTFILE") + (let ((hfile (expand-file-name (or (getenv "GDBHISTFILE") (if (eq system-type 'ms-dos) "_gdb_history" ".gdb_history")))) From 18d05bed653e4248b49250a0df930f8dd107aaa2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 22 Mar 2011 19:52:52 -0700 Subject: [PATCH 084/166] esh-opt trivia. * lisp/eshell/esh-opt.el (eshell-eval-using-options): Do not bind unused local variable `eshell-option-stub'. --- lisp/ChangeLog | 3 +++ lisp/eshell/esh-opt.el | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index adfbc6ce440..603888477fb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-03-23 Glenn Morris + * eshell/esh-opt.el (eshell-eval-using-options): + Do not bind unused local variable `eshell-option-stub'. + * progmodes/gdb-mi.el (gdb): Fix typo in previous change. 2011-03-22 Juanma Barranquero diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el index a9e8f11c39a..91d3cac198a 100644 --- a/lisp/eshell/esh-opt.el +++ b/lisp/eshell/esh-opt.el @@ -102,10 +102,9 @@ interned variable `args' (created using a `let' form)." macro-args (list 'eshell-stringify-list (list 'eshell-flatten-list macro-args))))) - (let ,(append (mapcar (lambda (opt) - (or (and (listp opt) (nth 3 opt)) - 'eshell-option-stub)) - (cadr options)) + (let ,(append (delq nil (mapcar (lambda (opt) + (and (listp opt) (nth 3 opt))) + (cadr options))) '(usage-msg last-value ext-command args)) (eshell-do-opt ,name ,options (quote ,body-forms))))) From 8ae17ff2bf7443379745356de33826b306dfefdf Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 22 Mar 2011 19:57:57 -0700 Subject: [PATCH 085/166] * admin/notes/bzr: Update bzr changelog_merge plugin details. --- admin/notes/bzr | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/admin/notes/bzr b/admin/notes/bzr index db9e6e0dcda..5600c9badb0 100644 --- a/admin/notes/bzr +++ b/admin/notes/bzr @@ -65,23 +65,22 @@ removes a file, then remove the corresponding files by hand. The following description uses bound branches, presumably it works in a similar way with unbound ones. -0) (First time only) Get the bzr changelog_merge plugin: +0) (First time only) Get the bzr changelog_merge plugin +(this will be included by default in bzr 2.4 onwards): cd ~/.bazaar/plugins -bzr branch lp:bzr-changelog-merge +# The following is an improved version of: lp:bzr-changelog-merge +bzr branch lp:~spiv/bzr-changelog-merge/non-head-edits-723968 mv bzr-changelog-merge changelog_merge -This will make merging ChangeLogs a lot smoother. It merges new -entries to the top of the file, rather than trying to fit them in -mid-way through. +This should make merging ChangeLogs smoother. It merges new entries +to the top of the file, rather than trying to fit them in mid-way +through. Newer versions of the plugin should also be able to deal +with changes to *old* ChangeLog entries, that should not be floated to +the head of the file (see launchpad#723968). -Sigh. This plugin has a drawback. People often like to edit older -ChangeLog entries, not at the head of the file. Frequently they do -this in the same commit as making new entries. Using this plugin -will merge ALL changed entries (including older ones) to the top of -the destination file. - -Maybe the default Emacs behavior without this plugin is better, I dunno. +Maybe the default Emacs behavior without this plugin is better, +though, it's not clear yet. 1) Get clean, up-to-date copies of the emacs-23 and trunk branches. Check for any uncommitted changes with bzr status. From 8cc1d5193337bef03f9525f2c017f6e70c4e64b9 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 22 Mar 2011 20:09:55 -0700 Subject: [PATCH 086/166] Replace mkinstalldirs with `install-sh -d', as automake recommends. * Makefile.in (mkdir): Use `install-sh -d' instead of mkinstalldirs. (sync-from-gnulib): Don't sync mkinstalldirs. * make-dist: Don't distribute mkinstalldirs. * leim/Makefile.in (install): Use `install-sh -d' rather than mkinstalldirs. * lib-src/Makefile.in ($(DESTDIR)${archlibdir}): Use `install-sh -d' rather than mkinstalldirs. * configure.in, doc/emacs/Makefile.in: Update comments. * admin/notes/copyright: Remove mkinstalldirs. --- ChangeLog | 6 ++ Makefile.in | 5 +- admin/notes/copyright | 4 -- configure.in | 2 +- doc/emacs/Makefile.in | 2 +- leim/ChangeLog | 4 ++ leim/Makefile.in | 2 +- lib-src/ChangeLog | 5 ++ lib-src/Makefile.in | 4 +- make-dist | 2 +- mkinstalldirs | 162 ------------------------------------------ 11 files changed, 23 insertions(+), 175 deletions(-) delete mode 100755 mkinstalldirs diff --git a/ChangeLog b/ChangeLog index f833e736e02..bab46c08c99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-03-23 Glenn Morris + + * Makefile.in (mkdir): Use `install-sh -d' instead of mkinstalldirs. + (sync-from-gnulib): Don't sync mkinstalldirs. + * make-dist: Don't distribute mkinstalldirs. + 2011-03-23 Paul Eggert Fix more problems found by GCC 4.5.2's static checks. diff --git a/Makefile.in b/Makefile.in index 4dd8cff1bbc..c94d7a5445a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -347,7 +347,6 @@ sync-from-gnulib: $(gnulib_srcdir) $(gnulib_srcdir)/build-aux/config.sub \ $(gnulib_srcdir)/build-aux/config.guess \ $(gnulib_srcdir)/build-aux/install-sh \ - $(gnulib_srcdir)/build-aux/mkinstalldirs \ $(gnulib_srcdir)/build-aux/move-if-change \ $(srcdir) cd $(srcdir) && autoreconf -I m4 @@ -678,7 +677,7 @@ install-strip: ### Build all the directories we're going to install Emacs in. Since ### we may be creating several layers of directories (for example, -### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use mkinstalldirs +### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use install-sh -d ### instead of mkdir. Not all systems' mkdir programs have the `-p' flag. ### We set the umask so that any created directories are world-readable. ### FIXME it would be good to warn about non-standard permissions of @@ -692,7 +691,7 @@ mkdir: FRC done ; \ icondirs=`echo "$${icondirs}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},g'` ; \ umask 022 ; \ - $(srcdir)/mkinstalldirs $(DESTDIR)${datadir} ${COPYDESTS} \ + $(srcdir)/install-sh -d $(DESTDIR)${datadir} ${COPYDESTS} \ $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \ $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \ $(DESTDIR)${datadir}/emacs/site-lisp \ diff --git a/admin/notes/copyright b/admin/notes/copyright index 54d97adaf1c..45a8858f815 100644 --- a/admin/notes/copyright +++ b/admin/notes/copyright @@ -143,10 +143,6 @@ lib/Makefile.in install-sh - this file is copyright MIT, which is OK. Leave the copyright alone. -mkinstalldirs -src/m/news-r6.h - public domain, leave alone. - etc/refcards/*.tex also update the \def\year macro for the latest year. diff --git a/configure.in b/configure.in index faf14fc6bb3..f450b890823 100644 --- a/configure.in +++ b/configure.in @@ -1359,7 +1359,7 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' ## In parallel builds, another make might create depdir between ## the first test and mkdir, so stick another test on the end. - ## Or use mkinstalldirs? mkdir -p is not portable. + ## Or use install-sh -d? mkdir -p is not portable. MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' deps_frag=autodeps.mk fi diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in index ae142dba6e6..aca17ce817d 100644 --- a/doc/emacs/Makefile.in +++ b/doc/emacs/Makefile.in @@ -111,7 +111,7 @@ EMACSSOURCES= \ ## This seems pointless. The info/ directory exists in both the ## repository and the release tarfiles. We do not use any -## equivalent of mkdir -p/mkinstalldirs, so this is not a general +## equivalent of mkdir -p/install-sh -d, so this is not a general ## solution anyway. The second test -d is for parallel builds. mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir} diff --git a/leim/ChangeLog b/leim/ChangeLog index 7334fa991c9..08da90c2aa8 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,7 @@ +2011-03-23 Glenn Morris + + * Makefile.in (install): Use `install-sh -d' rather than mkinstalldirs. + 2011-02-28 Juanma Barranquero * quail/ethiopic.el ("ethiopic"): Fix tpo in docstring. diff --git a/leim/Makefile.in b/leim/Makefile.in index 8c2baadf15f..531f0481f7a 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in @@ -220,7 +220,7 @@ MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done install: all if [ ! -d ${INSTALLDIR} ] ; then \ - umask 022; ${srcdir}/../mkinstalldirs ${INSTALLDIR}; \ + umask 022; ${srcdir}/../install-sh -d ${INSTALLDIR}; \ else true; fi if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \ rm -f ${INSTALLDIR}/leim-list.el; \ diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 3df2f6881db..0e46a83aafa 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-23 Glenn Morris + + * Makefile.in ($(DESTDIR)${archlibdir}): + Use `install-sh -d' rather than mkinstalldirs. + 2011-03-23 Paul Eggert * ebrowse.c: Use size_t, not int, for sizes. diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index f671b0844ce..36366a4d2e7 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -235,13 +235,13 @@ maybe-blessmail: $(BLESSMAIL_TARGET) $(DESTDIR)${archlibdir}: all @echo @echo "Installing utilities run internally by Emacs." - umask 022; $(top_srcdir)/mkinstalldirs $(DESTDIR)${archlibdir} + umask 022; $(top_srcdir)/install-sh -d $(DESTDIR)${archlibdir} if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \ for file in ${UTILITIES}; do \ $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \ done ; \ fi - umask 022; $(top_srcdir)/mkinstalldirs $(DESTDIR)${gamedir}; \ + umask 022; $(top_srcdir)/install-sh -d $(DESTDIR)${gamedir}; \ touch $(DESTDIR)${gamedir}/snake-scores; \ touch $(DESTDIR)${gamedir}/tetris-scores -if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score && chmod u+s $(DESTDIR)${archlibdir}/update-game-score; then \ diff --git a/make-dist b/make-dist index ee0efb04c3a..1a92d48a6ba 100755 --- a/make-dist +++ b/make-dist @@ -286,7 +286,7 @@ echo "Making links to top-level files" ln INSTALL README BUGS move-if-change ${tempdir} ln ChangeLog Makefile.in configure configure.in ${tempdir} ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} -ln mkinstalldirs config.sub config.guess install-sh ${tempdir} +ln config.sub config.guess install-sh ${tempdir} ln aclocal.m4 ${tempdir} ln compile depcomp missing ${tempdir} ln arg-nonnull.h c++defs.h warn-on-use.h ${tempdir} diff --git a/mkinstalldirs b/mkinstalldirs deleted file mode 100755 index 4191a45dbd7..00000000000 --- a/mkinstalldirs +++ /dev/null @@ -1,162 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy - -scriptversion=2009-04-28.21; # UTC - -# Original author: Noah Friedman -# Created: 1993-05-16 -# Public domain. -# -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' -IFS=" "" $nl" -errstatus=0 -dirmode= - -usage="\ -Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... - -Create each directory DIR (with mode MODE, if specified), including all -leading file name components. - -Report bugs to ." - -# process command line arguments -while test $# -gt 0 ; do - case $1 in - -h | --help | --h*) # -h for help - echo "$usage" - exit $? - ;; - -m) # -m PERM arg - shift - test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } - dirmode=$1 - shift - ;; - --version) - echo "$0 $scriptversion" - exit $? - ;; - --) # stop option processing - shift - break - ;; - -*) # unknown option - echo "$usage" 1>&2 - exit 1 - ;; - *) # first non-opt arg - break - ;; - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done - -case $# in - 0) exit 0 ;; -esac - -# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and -# mkdir -p a/c at the same time, both will detect that a is missing, -# one will create a, then the other will try to create a and die with -# a "File exists" error. This is a problem when calling mkinstalldirs -# from a parallel make. We use --version in the probe to restrict -# ourselves to GNU mkdir, which is thread-safe. -case $dirmode in - '') - if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - echo "mkdir -p -- $*" - exec mkdir -p -- "$@" - else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - test -d ./-p && rmdir ./-p - test -d ./--version && rmdir ./--version - fi - ;; - *) - if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && - test ! -d ./--version; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - else - # Clean up after NextStep and OpenStep mkdir. - for d in ./-m ./-p ./--version "./$dirmode"; - do - test -d $d && rmdir $d - done - fi - ;; -esac - -for file -do - case $file in - /*) pathcomp=/ ;; - *) pathcomp= ;; - esac - oIFS=$IFS - IFS=/ - set fnord $file - shift - IFS=$oIFS - - for d - do - test "x$d" = x && continue - - pathcomp=$pathcomp$d - case $pathcomp in - -*) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - lasterr= - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp=$pathcomp/ - done -done - -exit $errstatus - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: From fe7be2210f2e43142f9280a43b912273923186d4 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 22 Mar 2011 20:32:55 -0700 Subject: [PATCH 087/166] Fix ChangeLog typo. --- src/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a4312efceb9..4994aaa9fa8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -10474,8 +10474,8 @@ (POSIX_SIGNALS): Do not define. Remove support for old UNIX System V systems. - * s/unixware.h: Add the contents of s/usg-5-4-2.h. - * s/usg-5-4-2.h: Remove. + * s/unixware.h: Add the contents of s/usg5-4-2.h. + * s/usg5-4-2.h: Remove. Remove support for Solaris on PPC and for old versions. * s/sol2-6.h: Add the contents of s/sol-2.3.h, s/sol-2.4.h, s/sol-2.5.h. From abd57f59601366e8e996b65a45eb1f4bdb6774ed Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 22 Mar 2011 20:38:15 -0700 Subject: [PATCH 088/166] * admin/notes/copyright: Remove comments about deleted files in src/{m,s}. Files that were merged into other files have been kept. --- admin/notes/copyright | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/admin/notes/copyright b/admin/notes/copyright index 45a8858f815..adc12f0bfb5 100644 --- a/admin/notes/copyright +++ b/admin/notes/copyright @@ -492,9 +492,8 @@ assignment. So this could be restored if it is still useful, but Jan Dj says it is obsolete: -src/m/mips4.h, news-risc.h, pmax.h -src/s/aix3-2.h, bsd386.h, hpux8.h, hpux9.h, irix4-0.h, irix5-0.h, -netbsd.h, sol2-3.h, usg5-4-2.h +src/s/aix3-2.h, hpux8.h, hpux9.h, irix5-0.h, netbsd.h, usg5-4-2.h + [note some of these have since been merged into other files] - all these (not obviously trivial) files were missing copyrights till Feb 2007, when FSF copyright was added. Matt Norwood advised: @@ -509,22 +508,6 @@ netbsd.h, sol2-3.h, usg5-4-2.h Here is my (rgm) take on the details of the above files: -mips4.h - might be trivial? started trivial, been added to in tiny changes by - those with FSF assignment, often result of email suggestions by others. - -news-risc.h - started trivial. Grown by tiny additions, plus chunk - from mips.h, which was and is Copyright FSF - -pmax.h - started trivial. grown in tiny changes, except for maybe Jim Wilson's - comment. - -? irix4-0.h - I would say started non-trivial (1992, rms). only tiny changes since - installed. - ? irix5-0.h I would say started non-trivial (1993, jimb, heavily based on irix4-0.h). A few borderline non-tiny changes since. @@ -533,11 +516,7 @@ usg5-4-2.h started non-trivial, but was heavily based on usg5-4.h, which was and is copyright FSF. only tiny changes since installed. -sol2-3.h - started trivial. only non-tiny change (1994) incorporated code from - usg5-4.h, which was and is copyright FSF. - -aix3-2.h, bsd386.h, hpux8.h, hpux9.h, netbsd.h +aix3-2.h, hpux8.h, hpux9.h, netbsd.h started trivial, grown in tiny changes. netbsd.h: @@ -552,8 +531,8 @@ Someone might want to tweak the copyright years (for dates before Note: erring on the side of caution, I also added notices to some files I thought might be considered non-trivial (if one includes comment) in s/: - aix4-1.h hpux10.h irix6-0.h irix6-5.h - ptx4.h sol2.h + aix4-1.h hpux10.h irix6-5.h + sol2.h (everything with > 30 non-blank lines, which at least is _some_ kind of system) From 6ad6792b390fd7d45773a5c14e29d44a54c17f1e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 23 Mar 2011 00:09:49 -0400 Subject: [PATCH 089/166] Auto-commit of generated files. --- autogen/Makefile.in | 215 +++++++++++++++++++++++++-- autogen/aclocal.m4 | 2 + autogen/config.in | 6 + autogen/configure | 344 ++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 542 insertions(+), 25 deletions(-) diff --git a/autogen/Makefile.in b/autogen/Makefile.in index 502b3dbb927..88be88ad08f 100644 --- a/autogen/Makefile.in +++ b/autogen/Makefile.in @@ -24,7 +24,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink strftime symlink sys_stat +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdio strftime symlink sys_stat VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -57,9 +57,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/longlong.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/md5.m4 \ $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ - $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/socklen.m4 \ + $(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat.m4 \ + $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ + $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdio_h.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ @@ -67,7 +68,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -150,6 +151,7 @@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ @@ -158,15 +160,31 @@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ +GNULIB_FCLOSE = @GNULIB_FCLOSE@ +GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FOPEN = @GNULIB_FOPEN@ +GNULIB_FPRINTF = @GNULIB_FPRINTF@ +GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ +GNULIB_FPURGE = @GNULIB_FPURGE@ +GNULIB_FPUTC = @GNULIB_FPUTC@ +GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREOPEN = @GNULIB_FREOPEN@ +GNULIB_FSEEK = @GNULIB_FSEEK@ +GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ +GNULIB_FTELL = @GNULIB_FTELL@ +GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ +GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ +GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ @@ -194,22 +212,37 @@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ +GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ +GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ +GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ +GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ +GNULIB_PRINTF = @GNULIB_PRINTF@ +GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PUTC = @GNULIB_PUTC@ +GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ +GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_REMOVE = @GNULIB_REMOVE@ +GNULIB_RENAME = @GNULIB_RENAME@ +GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ @@ -219,6 +252,7 @@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ +GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ @@ -228,6 +262,14 @@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ +GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ +GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ +GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ +GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VPRINTF = @GNULIB_VPRINTF@ +GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ +GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ @@ -243,15 +285,24 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ +HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ +HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ +HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ +HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ +HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ +HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ @@ -259,8 +310,10 @@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ +HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ +HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ @@ -301,6 +354,7 @@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ @@ -327,6 +381,8 @@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ +HAVE_VASPRINTF = @HAVE_VASPRINTF@ +HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_XSERVER = @HAVE_XSERVER@ @@ -397,6 +453,7 @@ M_FILE = @M_FILE@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ +NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ @@ -404,6 +461,7 @@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ +NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ @@ -438,15 +496,28 @@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ +REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ +REPLACE_FCLOSE = @REPLACE_FCLOSE@ +REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FOPEN = @REPLACE_FOPEN@ +REPLACE_FPRINTF = @REPLACE_FPRINTF@ +REPLACE_FPURGE = @REPLACE_FPURGE@ +REPLACE_FREOPEN = @REPLACE_FREOPEN@ +REPLACE_FSEEK = @REPLACE_FSEEK@ +REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ +REPLACE_FTELL = @REPLACE_FTELL@ +REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ +REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ @@ -464,25 +535,42 @@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ +REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ +REPLACE_PERROR = @REPLACE_PERROR@ +REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ +REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMOVE = @REPLACE_REMOVE@ +REPLACE_RENAME = @REPLACE_RENAME@ +REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ +REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ +REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ +REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ +REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ +REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ +REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ +REPLACE_VPRINTF = @REPLACE_VPRINTF@ +REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ +REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ RSVG_CFLAGS = @RSVG_CFLAGS@ @@ -601,21 +689,22 @@ x_default_search_path = @x_default_search_path@ # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) $(STDBOOL_H) \ - $(STDDEF_H) $(STDINT_H) stdlib.h sys/stat.h time.h unistd.h \ - warn-on-use.h + $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h sys/stat.h time.h \ + unistd.h warn-on-use.h EXTRA_DIST = $(top_srcdir)/./arg-nonnull.h $(top_srcdir)/./c++defs.h \ md5.c md5.h dosname.h ftoastr.c ftoastr.h filemode.c \ filemode.h getloadavg.c getopt.c getopt.in.h getopt1.c \ getopt_int.h intprops.h lstat.c mktime-internal.h mktime.c \ readlink.c stat.c stdbool.in.h stddef.in.h stdint.in.h \ - stdlib.in.h strftime.c strftime.h symlink.c sys_stat.in.h \ - time.in.h time_r.c unistd.in.h $(top_srcdir)/./warn-on-use.h + stdio.in.h stdlib.in.h strftime.c strftime.h symlink.c \ + sys_stat.in.h time.in.h time_r.c unistd.in.h \ + $(top_srcdir)/./warn-on-use.h MOSTLYCLEANDIRS = sys MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ c++defs.h c++defs.h-t getopt.h getopt.h-t stdbool.h \ - stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdlib.h \ - stdlib.h-t sys/stat.h sys/stat.h-t time.h time.h-t unistd.h \ - unistd.h-t warn-on-use.h warn-on-use.h-t + stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \ + stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \ + time.h-t unistd.h unistd.h-t warn-on-use.h warn-on-use.h-t noinst_LIBRARIES = libgnu.a DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src libgnu_a_SOURCES = dtoastr.c gettext.h ignore-value.h @@ -996,6 +1085,108 @@ stdint.h: stdint.in.h } > $@-t && \ mv $@-t $@ +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ + -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ + -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ + -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ + -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ + -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ + -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ + -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ + -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ + -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ + -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ + -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ + -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ + -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ + -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ + -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ + -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ + -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ + -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ + -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ + -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ + -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ + -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ + -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ + -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ + -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ + -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ + -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ + -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ + -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ + -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ + -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \ + -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ + -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ + -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ + -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ + -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ + -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ + < $(srcdir)/stdio.in.h | \ + sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ + -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ + -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ + -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ + -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ + -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ + -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ + -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ + -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ + -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ + -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ + -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ + -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ + -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ + -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ + -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ + -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ + -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ + -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ + -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ + -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ + -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ + -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ + -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ + -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ + -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ + -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ + -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ + -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ + -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ + -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ + -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ + -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ + -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ + -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ + -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ + -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ + -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ + -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ + -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ + -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ + -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ + -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ + -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ + -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ + # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) diff --git a/autogen/aclocal.m4 b/autogen/aclocal.m4 index 963faafb453..f23562235df 100644 --- a/autogen/aclocal.m4 +++ b/autogen/aclocal.m4 @@ -999,11 +999,13 @@ m4_include([m4/md5.m4]) m4_include([m4/mktime.m4]) m4_include([m4/multiarch.m4]) m4_include([m4/readlink.m4]) +m4_include([m4/socklen.m4]) m4_include([m4/st_dm_mode.m4]) m4_include([m4/stat.m4]) m4_include([m4/stdbool.m4]) m4_include([m4/stddef_h.m4]) m4_include([m4/stdint.m4]) +m4_include([m4/stdio_h.m4]) m4_include([m4/stdlib_h.m4]) m4_include([m4/strftime.m4]) m4_include([m4/symlink.m4]) diff --git a/autogen/config.in b/autogen/config.in index 8889213b781..eb7fd7749dd 100644 --- a/autogen/config.in +++ b/autogen/config.in @@ -833,6 +833,9 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK +/* Define to 1 if you have the header file. */ +#undef HAVE_WS2TCPIP_H + /* Define to 1 if you want to use version 11 of X windows. Otherwise, Emacs expects to use version 10. */ #undef HAVE_X11 @@ -1206,6 +1209,9 @@ along with GNU Emacs. If not, see . */ # define __restrict__ #endif +/* type to use in place of socklen_t if not defined */ +#undef socklen_t + /* Define to any substitute for sys_siglist. */ #undef sys_siglist diff --git a/autogen/configure b/autogen/configure index 4c45db1badd..47b760c2dd8 100755 --- a/autogen/configure +++ b/autogen/configure @@ -673,6 +673,93 @@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H NEXT_SYS_STAT_H NEXT_AS_FIRST_DIRECTIVE_STDLIB_H NEXT_STDLIB_H +NEXT_AS_FIRST_DIRECTIVE_STDIO_H +NEXT_STDIO_H +REPLACE_VSPRINTF +REPLACE_VSNPRINTF +REPLACE_VPRINTF +REPLACE_VFPRINTF +REPLACE_VDPRINTF +REPLACE_VASPRINTF +REPLACE_TMPFILE +REPLACE_STDIO_WRITE_FUNCS +REPLACE_SPRINTF +REPLACE_SNPRINTF +REPLACE_RENAMEAT +REPLACE_RENAME +REPLACE_REMOVE +REPLACE_PRINTF +REPLACE_POPEN +REPLACE_PERROR +REPLACE_OBSTACK_PRINTF +REPLACE_GETLINE +REPLACE_GETDELIM +REPLACE_FTELLO +REPLACE_FTELL +REPLACE_FSEEKO +REPLACE_FSEEK +REPLACE_FREOPEN +REPLACE_FPURGE +REPLACE_FPRINTF +REPLACE_FOPEN +REPLACE_FFLUSH +REPLACE_FCLOSE +REPLACE_DPRINTF +HAVE_VDPRINTF +HAVE_VASPRINTF +HAVE_RENAMEAT +HAVE_FTELLO +HAVE_FSEEKO +HAVE_DPRINTF +HAVE_DECL_VSNPRINTF +HAVE_DECL_SNPRINTF +HAVE_DECL_OBSTACK_PRINTF +HAVE_DECL_GETLINE +HAVE_DECL_GETDELIM +HAVE_DECL_FTELLO +HAVE_DECL_FSEEKO +HAVE_DECL_FPURGE +GNULIB_VSPRINTF_POSIX +GNULIB_VSNPRINTF +GNULIB_VPRINTF_POSIX +GNULIB_VPRINTF +GNULIB_VFPRINTF_POSIX +GNULIB_VFPRINTF +GNULIB_VDPRINTF +GNULIB_VASPRINTF +GNULIB_TMPFILE +GNULIB_STDIO_H_SIGPIPE +GNULIB_SPRINTF_POSIX +GNULIB_SNPRINTF +GNULIB_RENAMEAT +GNULIB_RENAME +GNULIB_REMOVE +GNULIB_PUTS +GNULIB_PUTCHAR +GNULIB_PUTC +GNULIB_PRINTF_POSIX +GNULIB_PRINTF +GNULIB_POPEN +GNULIB_PERROR +GNULIB_OBSTACK_PRINTF_POSIX +GNULIB_OBSTACK_PRINTF +GNULIB_GETLINE +GNULIB_GETDELIM +GNULIB_FWRITE +GNULIB_FTELLO +GNULIB_FTELL +GNULIB_FSEEKO +GNULIB_FSEEK +GNULIB_FREOPEN +GNULIB_FPUTS +GNULIB_FPUTC +GNULIB_FPURGE +GNULIB_FPRINTF_POSIX +GNULIB_FPRINTF +GNULIB_FOPEN +GNULIB_FFLUSH +GNULIB_FCLOSE +GNULIB_DPRINTF STDINT_H WINT_T_SUFFIX WCHAR_T_SUFFIX @@ -2943,6 +3030,7 @@ as_fn_append ac_header_list " getopt.h" as_fn_append ac_func_list " lstat" as_fn_append ac_func_list " alarm" as_fn_append ac_func_list " readlink" +as_fn_append ac_header_list " sys/socket.h" as_fn_append ac_header_list " wchar.h" as_fn_append ac_header_list " stdint.h" as_fn_append ac_func_list " tzset" @@ -6120,10 +6208,12 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } # Code from module mktime: # Code from module multiarch: # Code from module readlink: + # Code from module socklen: # Code from module stat: # Code from module stdbool: # Code from module stddef: # Code from module stdint: + # Code from module stdio: # Code from module stdlib: # Code from module strftime: # Code from module symlink: @@ -7947,18 +8037,6 @@ $as_echo "#define NO_MATHERR 1" >>confdefs.h fi -for ac_header in sys/socket.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SOCKET_H 1 -_ACEOF - -fi - -done - for ac_header in net/if.h do : ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default @@ -8667,7 +8745,7 @@ $as_echo "$ac_enable_autodepend" >&6; } DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' ## In parallel builds, another make might create depdir between ## the first test and mkdir, so stick another test on the end. - ## Or use mkinstalldirs? mkdir -p is not portable. + ## Or use install-sh -d? mkdir -p is not portable. MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' deps_frag=autodeps.mk fi @@ -14761,6 +14839,24 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + + if test $ac_cv_header_sys_socket_h = no; then + for ac_header in ws2tcpip.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" +if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WS2TCPIP_H 1 +_ACEOF + +fi + +done + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if test "${ac_cv_header_stdbool_h+set}" = set; then : @@ -15008,6 +15104,93 @@ $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h + GNULIB_DPRINTF=0; + GNULIB_FCLOSE=0; + GNULIB_FFLUSH=0; + GNULIB_FOPEN=0; + GNULIB_FPRINTF=0; + GNULIB_FPRINTF_POSIX=0; + GNULIB_FPURGE=0; + GNULIB_FPUTC=0; + GNULIB_FPUTS=0; + GNULIB_FREOPEN=0; + GNULIB_FSEEK=0; + GNULIB_FSEEKO=0; + GNULIB_FTELL=0; + GNULIB_FTELLO=0; + GNULIB_FWRITE=0; + GNULIB_GETDELIM=0; + GNULIB_GETLINE=0; + GNULIB_OBSTACK_PRINTF=0; + GNULIB_OBSTACK_PRINTF_POSIX=0; + GNULIB_PERROR=0; + GNULIB_POPEN=0; + GNULIB_PRINTF=0; + GNULIB_PRINTF_POSIX=0; + GNULIB_PUTC=0; + GNULIB_PUTCHAR=0; + GNULIB_PUTS=0; + GNULIB_REMOVE=0; + GNULIB_RENAME=0; + GNULIB_RENAMEAT=0; + GNULIB_SNPRINTF=0; + GNULIB_SPRINTF_POSIX=0; + GNULIB_STDIO_H_SIGPIPE=0; + GNULIB_TMPFILE=0; + GNULIB_VASPRINTF=0; + GNULIB_VDPRINTF=0; + GNULIB_VFPRINTF=0; + GNULIB_VFPRINTF_POSIX=0; + GNULIB_VPRINTF=0; + GNULIB_VPRINTF_POSIX=0; + GNULIB_VSNPRINTF=0; + GNULIB_VSPRINTF_POSIX=0; + HAVE_DECL_FPURGE=1; + HAVE_DECL_FSEEKO=1; + HAVE_DECL_FTELLO=1; + HAVE_DECL_GETDELIM=1; + HAVE_DECL_GETLINE=1; + HAVE_DECL_OBSTACK_PRINTF=1; + HAVE_DECL_SNPRINTF=1; + HAVE_DECL_VSNPRINTF=1; + HAVE_DPRINTF=1; + HAVE_FSEEKO=1; + HAVE_FTELLO=1; + HAVE_RENAMEAT=1; + HAVE_VASPRINTF=1; + HAVE_VDPRINTF=1; + REPLACE_DPRINTF=0; + REPLACE_FCLOSE=0; + REPLACE_FFLUSH=0; + REPLACE_FOPEN=0; + REPLACE_FPRINTF=0; + REPLACE_FPURGE=0; + REPLACE_FREOPEN=0; + REPLACE_FSEEK=0; + REPLACE_FSEEKO=0; + REPLACE_FTELL=0; + REPLACE_FTELLO=0; + REPLACE_GETDELIM=0; + REPLACE_GETLINE=0; + REPLACE_OBSTACK_PRINTF=0; + REPLACE_PERROR=0; + REPLACE_POPEN=0; + REPLACE_PRINTF=0; + REPLACE_REMOVE=0; + REPLACE_RENAME=0; + REPLACE_RENAMEAT=0; + REPLACE_SNPRINTF=0; + REPLACE_SPRINTF=0; + REPLACE_STDIO_WRITE_FUNCS=0; + REPLACE_TMPFILE=0; + REPLACE_VASPRINTF=0; + REPLACE_VDPRINTF=0; + REPLACE_VFPRINTF=0; + REPLACE_VPRINTF=0; + REPLACE_VSNPRINTF=0; + REPLACE_VSPRINTF=0; + + ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include " if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : @@ -16333,6 +16516,70 @@ $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h + # Code from module socklen: + ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " +/* is not needed according to POSIX, but the + in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#if HAVE_SYS_SOCKET_H +# include +#elif HAVE_WS2TCPIP_H +# include +#endif + +" +if test "x$ac_cv_type_socklen_t" = x""yes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 +$as_echo_n "checking for socklen_t equivalent... " >&6; } + if test "${gl_cv_socklen_t_equiv+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + gl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t "unsigned int" "long int" "unsigned long int"; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + + int getpeername (int, $arg2 *, $t *); +int +main () +{ +$t len; + getpeername (0, 0, &len); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_socklen_t_equiv="$t" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$gl_cv_socklen_t_equiv" != "" && break + done + test "$gl_cv_socklen_t_equiv" != "" && break + done + +fi + + if test "$gl_cv_socklen_t_equiv" = ""; then + as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 +$as_echo "$gl_cv_socklen_t_equiv" >&6; } + +cat >>confdefs.h <<_ACEOF +#define socklen_t $gl_cv_socklen_t_equiv +_ACEOF + +fi + # Code from module stat: @@ -17272,6 +17519,77 @@ _ACEOF fi + # Code from module stdio: + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdio_h='<'stdio.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_stdio_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/stdio.h#{ + s#.*"\(.*/stdio.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 +$as_echo "$gl_cv_next_stdio_h" >&6; } + fi + NEXT_STDIO_H=$gl_cv_next_stdio_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdio.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdio_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive + + + + + GNULIB_FPRINTF=1 + GNULIB_PRINTF=1 + GNULIB_VFPRINTF=1 + GNULIB_VPRINTF=1 + GNULIB_FPUTC=1 + GNULIB_PUTC=1 + GNULIB_PUTCHAR=1 + GNULIB_FPUTS=1 + GNULIB_PUTS=1 + GNULIB_FWRITE=1 + + + + # Code from module stdlib: From 9bb73912f78111b09d2b90250d6e49a1fa0c4075 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 22 Mar 2011 23:40:56 -0700 Subject: [PATCH 090/166] * autogen/update_autogen: Fix typo. --- ChangeLog | 2 ++ autogen/update_autogen | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bab46c08c99..5711f59dd67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2011-03-23 Glenn Morris + * autogen/update_autogen: Fix typo. + * Makefile.in (mkdir): Use `install-sh -d' instead of mkinstalldirs. (sync-from-gnulib): Don't sync mkinstalldirs. * make-dist: Don't distribute mkinstalldirs. diff --git a/autogen/update_autogen b/autogen/update_autogen index 0b26dd27d2b..f655404a72c 100755 --- a/autogen/update_autogen +++ b/autogen/update_autogen @@ -170,7 +170,7 @@ msg "Committing..." cd ../ opt= -[ "$quiet" ] || opt=-q +[ "$quiet" ] && opt=-q bzr commit $opt -m "Auto-commit of generated files." $modified || \ die "bzr commit error" From 904a432cf44c176fa3c88a975f046d0cf2992023 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 23 Mar 2011 00:58:05 -0700 Subject: [PATCH 091/166] * autogen/update_autogen (msg): Remove function; use `exec' instead. --- ChangeLog | 1 + autogen/update_autogen | 26 ++++++++++---------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5711f59dd67..5b953d4a87f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2011-03-23 Glenn Morris * autogen/update_autogen: Fix typo. + (msg): Remove function; use `exec' instead. * Makefile.in (mkdir): Use `install-sh -d' instead of mkinstalldirs. (sync-from-gnulib): Don't sync mkinstalldirs. diff --git a/autogen/update_autogen b/autogen/update_autogen index f655404a72c..de525a9f4a2 100755 --- a/autogen/update_autogen +++ b/autogen/update_autogen @@ -104,14 +104,10 @@ OPTIND=1 [ $# -eq 0 ] || die "Wrong number of arguments" -function msg () -{ - [ "$quiet" ] && return 0 - echo "$@" -} # function msg +[ "$quiet" ] && exec 1> /dev/null -msg "Running bzr status..." +echo "Running bzr status..." bzr status -S $sources >| $tempfile || die "bzr status error for sources" @@ -119,7 +115,7 @@ while read stat file; do case $stat in M) - msg "Locally modified: $file" + echo "Locally modified: $file" [ "$force" ] || die "There are local modifications" ;; @@ -128,7 +124,7 @@ while read stat file; do done < $tempfile -msg "Running autoreconf..." +echo "Running autoreconf..." autoreconf -I m4 || die "autoreconf error" @@ -138,6 +134,7 @@ cp $genfiles autogen/ cd autogen +echo "Checking status of generated files..." bzr status -S $basegen >| $tempfile || \ die "bzr status error for generated files" @@ -155,28 +152,25 @@ done < $tempfile [ "$modified" ] || { - msg "No files were modified" + echo "No files were modified" exit 0 } -msg "Modified file(s): $modified" +echo "Modified file(s): $modified" [ "$commit" ] || exit 0 -msg "Committing..." +echo "Committing..." ## bzr status output is annoyingly always relative to top-level, not PWD. cd ../ -opt= -[ "$quiet" ] && opt=-q - -bzr commit $opt -m "Auto-commit of generated files." $modified || \ +bzr commit -m "Auto-commit of generated files." $modified || \ die "bzr commit error" -msg "Committed files: $modified" +echo "Committed files: $modified" exit From 12ea59a297551086de418573f6ee201fc3ef2768 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 23 Mar 2011 01:06:21 -0700 Subject: [PATCH 092/166] * cm.c (calccost): Turn while-do into do-while, for clarity. --- src/ChangeLog | 2 ++ src/cm.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4994aaa9fa8..1d3d4d65174 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-23 Paul Eggert + * cm.c (calccost): Turn while-do into do-while, for clarity. + Fix more problems found by GCC 4.5.2's static checks. * coding.c (encode_coding_raw_text): Avoid unnecessary test diff --git a/src/cm.c b/src/cm.c index 6379955b48c..42f855f1694 100644 --- a/src/cm.c +++ b/src/cm.c @@ -214,8 +214,9 @@ calccost (struct tty_display_info *tty, } totalcost = c * deltay; if (doit) - while (--deltay >= 0) + do emacs_tputs (tty, p, 1, cmputc); + while (0 < --deltay); x: if ((deltax = dstx - srcx) == 0) goto done; @@ -296,8 +297,9 @@ fail: } totalcost += c * deltax; if (doit) - while (--deltax >= 0) + do emacs_tputs (tty, p, 1, cmputc); + while (0 < --deltax); done: return totalcost; } From d284567f963fcbd340feef4d6fa46aa371c09b29 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 23 Mar 2011 01:09:13 -0700 Subject: [PATCH 093/166] * term.c (produce_glyphless_glyph): Remove unnecessary test. --- src/ChangeLog | 2 ++ src/term.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1d3d4d65174..47d9dbe5aa2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-23 Paul Eggert + * term.c (produce_glyphless_glyph): Remove unnecessary test. + * cm.c (calccost): Turn while-do into do-while, for clarity. Fix more problems found by GCC 4.5.2's static checks. diff --git a/src/term.c b/src/term.c index e84bbe125f8..94fafd73ed8 100644 --- a/src/term.c +++ b/src/term.c @@ -1952,7 +1952,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym) it->pixel_width = len; it->nglyphs = len; - if (len > 0 && it->glyph_row) + if (it->glyph_row) append_glyphless_glyph (it, face_id, str); } From 6ae5284811ba17222b14424a5fd71005c14ae131 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 23 Mar 2011 01:13:33 -0700 Subject: [PATCH 094/166] * chartab.c (sub_char_table_ref_and_range): Redo to avoid overflow concerns. --- src/ChangeLog | 3 +++ src/chartab.c | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 47d9dbe5aa2..b2686811875 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-23 Paul Eggert + * chartab.c (sub_char_table_ref_and_range): Redo to avoid overflow + concerns. + * term.c (produce_glyphless_glyph): Remove unnecessary test. * cm.c (calccost): Turn while-do into do-while, for clarity. diff --git a/src/chartab.c b/src/chartab.c index 85aa5932ac3..9a140eb8560 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -215,7 +215,7 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); int depth = XINT (tbl->depth); int min_char = XINT (tbl->min_char); - int max_char = min_char + chartab_chars[depth - 1] - 1; + int char_offset_lim = chartab_chars[depth - 1]; int chartab_idx = CHARTAB_IDX (c, depth, min_char), idx; Lisp_Object val; @@ -244,8 +244,9 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp break; } } - while ((c = min_char + (chartab_idx + 1) * chartab_chars[depth]) <= max_char - && *to >= c) + + while ((c = (chartab_idx + 1) * chartab_chars[depth]) < char_offset_lim + && (c += min_char) <= *to) { Lisp_Object this_val; From f86c98305dbfd21b29a4c358d08662da0c135522 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 23 Mar 2011 01:15:28 -0700 Subject: [PATCH 095/166] * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow concerns. --- src/ChangeLog | 3 +++ src/xterm.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b2686811875..a8bda0915f6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-23 Paul Eggert + * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow + concerns. + * chartab.c (sub_char_table_ref_and_range): Redo to avoid overflow concerns. diff --git a/src/xterm.c b/src/xterm.c index f87c22912a4..cdbce2f1c86 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9121,7 +9121,7 @@ x_make_frame_visible (struct frame *f) unknown reason, the call to XtMapWidget is completely ignored. Mapping the widget a second time works. */ - if (!FRAME_VISIBLE_P (f) && --retry_count > 0) + if (!FRAME_VISIBLE_P (f) && --retry_count != 0) goto retry; } } @@ -9726,7 +9726,7 @@ same_x_server (const char *name1, const char *name2) for (; *name1 != '\0' && *name1 == *name2; name1++, name2++) { if (*name1 == ':') - seen_colon++; + seen_colon = 1; if (seen_colon && *name1 == '.') return 1; } From dee091a37f6486dbbcf7bf00f6ee54d77033f997 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 23 Mar 2011 11:06:57 +0100 Subject: [PATCH 096/166] Use Frun_hooks rather than calling Vrun_hooks manually --- src/ChangeLog | 18 ++++++++++++++++++ src/buffer.c | 3 +-- src/callint.c | 3 +-- src/cmds.c | 2 +- src/editfns.c | 25 ++++++++++++++----------- src/emacs.c | 5 +++-- src/fileio.c | 6 +++--- src/frame.c | 2 +- src/insdel.c | 8 ++++---- src/keyboard.c | 35 +++++++++++++++-------------------- src/minibuf.c | 12 ++---------- src/term.c | 26 +++++++++++--------------- src/window.c | 36 ++++++++++++++++-------------------- 13 files changed, 90 insertions(+), 91 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4994aaa9fa8..f9766115042 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,21 @@ +2011-03-23 Julien Danjou + + * term.c (Fsuspend_tty, Fresume_tty): + * minibuf.c (read_minibuf, run_exit_minibuf_hook): + * window.c (temp_output_buffer_show): + * insdel.c (signal_before_change): + * frame.c (Fhandle_switch_frame): + * fileio.c (Fdo_auto_save): + * emacs.c (Fkill_emacs): + * editfns.c (save_excursion_restore): + * cmds.c (internal_self_insert): + * callint.c (Fcall_interactively): + * buffer.c (Fkill_all_local_variables): + * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1): + Use Frun_hooks. + (command_loop_1): Use Frun_hooks. Call safe_run_hooks + unconditionnaly since it does the check itself. + 2011-03-23 Paul Eggert Fix more problems found by GCC 4.5.2's static checks. diff --git a/src/buffer.c b/src/buffer.c index c0e6866dee1..da2cc1573c8 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2520,8 +2520,7 @@ The first thing this function does is run the normal hook `change-major-mode-hook'. */) (void) { - if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, Qchange_major_mode_hook); + Frun_hooks (1, &Qchange_major_mode_hook); /* Make sure none of the bindings in local_var_alist remain swapped in, in their symbols. */ diff --git a/src/callint.c b/src/callint.c index 282d8a82aa7..bb815a5bd01 100644 --- a/src/callint.c +++ b/src/callint.c @@ -423,8 +423,7 @@ invoke it. If KEYS is omitted or nil, the return value of error ("Attempt to select inactive minibuffer window"); /* If the current buffer wants to clean up, let it. */ - if (!NILP (Vmouse_leave_buffer_hook)) - call1 (Vrun_hooks, Qmouse_leave_buffer_hook); + Frun_hooks (1, &Qmouse_leave_buffer_hook); Fselect_window (w, Qnil); } diff --git a/src/cmds.c b/src/cmds.c index fa1ac5028ae..ebbb223c2db 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -501,7 +501,7 @@ internal_self_insert (int c, EMACS_INT n) } /* Run hooks for electric keys. */ - call1 (Vrun_hooks, Qpost_self_insert_hook); + Frun_hooks (1, &Qpost_self_insert_hook); return hairy; } diff --git a/src/editfns.c b/src/editfns.c index 1f98ff040b3..009e1d34bde 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -928,18 +928,21 @@ save_excursion_restore (Lisp_Object info) tem1 = BVAR (current_buffer, mark_active); BVAR (current_buffer, mark_active) = tem; - if (!NILP (Vrun_hooks)) + /* If mark is active now, and either was not active + or was at a different place, run the activate hook. */ + if (! NILP (tem)) { - /* If mark is active now, and either was not active - or was at a different place, run the activate hook. */ - if (! NILP (BVAR (current_buffer, mark_active))) - { - if (! EQ (omark, nmark)) - call1 (Vrun_hooks, intern ("activate-mark-hook")); - } - /* If mark has ceased to be active, run deactivate hook. */ - else if (! NILP (tem1)) - call1 (Vrun_hooks, intern ("deactivate-mark-hook")); + if (! EQ (omark, nmark)) + { + tem = intern ("activate-mark-hook"); + Frun_hooks (1, &tem); + } + } + /* If mark has ceased to be active, run deactivate hook. */ + else if (! NILP (tem1)) + { + tem = intern ("deactivate-mark-hook"); + Frun_hooks (1, &tem); } /* If buffer was visible in a window, and a different window was diff --git a/src/emacs.c b/src/emacs.c index bc7c07a9326..0382ade728d 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1972,14 +1972,15 @@ all of which are called before Emacs is actually killed. */) (Lisp_Object arg) { struct gcpro gcpro1; + Lisp_Object hook; GCPRO1 (arg); if (feof (stdin)) arg = Qt; - if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, intern ("kill-emacs-hook")); + hook = intern ("kill-emacs-hook"); + Frun_hooks (1, &hook); UNGCPRO; diff --git a/src/fileio.c b/src/fileio.c index 7d2f10d517c..64dda0a78e4 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5180,7 +5180,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) (Lisp_Object no_message, Lisp_Object current_only) { struct buffer *old = current_buffer, *b; - Lisp_Object tail, buf; + Lisp_Object tail, buf, hook; int auto_saved = 0; int do_handled_files; Lisp_Object oquit; @@ -5210,8 +5210,8 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) /* No GCPRO needed, because (when it matters) all Lisp_Object variables point to non-strings reached from Vbuffer_alist. */ - if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, intern ("auto-save-hook")); + hook = intern ("auto-save-hook"); + Frun_hooks (1, &hook); if (STRINGP (Vauto_save_list_file_name)) { diff --git a/src/frame.c b/src/frame.c index 3e00e1bf107..cdcb313280b 100644 --- a/src/frame.c +++ b/src/frame.c @@ -890,7 +890,7 @@ to that frame. */) { /* Preserve prefix arg that the command loop just cleared. */ KVAR (current_kboard, Vprefix_arg) = Vcurrent_prefix_arg; - call1 (Vrun_hooks, Qmouse_leave_buffer_hook); + Frun_hooks (1, &Qmouse_leave_buffer_hook); return do_switch_frame (event, 0, 0, Qnil); } diff --git a/src/insdel.c b/src/insdel.c index ad3460f9a64..1cbe3de20d2 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2137,14 +2137,14 @@ signal_before_change (EMACS_INT start_int, EMACS_INT end_int, specbind (Qinhibit_modification_hooks, Qt); - /* If buffer is unmodified, run a special hook for that case. */ + /* If buffer is unmodified, run a special hook for that case. The + check for Vfirst_change_hook is just a minor optimization. */ if (SAVE_MODIFF >= MODIFF - && !NILP (Vfirst_change_hook) - && !NILP (Vrun_hooks)) + && !NILP (Vfirst_change_hook)) { PRESERVE_VALUE; PRESERVE_START_END; - call1 (Vrun_hooks, Qfirst_change_hook); + Frun_hooks (1, &Qfirst_change_hook); } /* Now run the before-change-functions if any. */ diff --git a/src/keyboard.c b/src/keyboard.c index fc8622de0a1..39848ee490d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1492,10 +1492,7 @@ command_loop_1 (void) Vthis_command = cmd; real_this_command = cmd; - /* Note that the value cell will never directly contain nil - if the symbol is a local variable. */ - if (!NILP (Vpre_command_hook) && !NILP (Vrun_hooks)) - safe_run_hooks (Qpre_command_hook); + safe_run_hooks (Qpre_command_hook); already_adjusted = 0; @@ -1541,18 +1538,14 @@ command_loop_1 (void) } KVAR (current_kboard, Vlast_prefix_arg) = Vcurrent_prefix_arg; - /* Note that the value cell will never directly contain nil - if the symbol is a local variable. */ - if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks)) - safe_run_hooks (Qpost_command_hook); + safe_run_hooks (Qpost_command_hook); /* If displaying a message, resize the echo area window to fit that message's size exactly. */ if (!NILP (echo_area_buffer[0])) resize_echo_area_exactly (); - if (!NILP (Vdeferred_action_list)) - safe_run_hooks (Qdeferred_action_function); + safe_run_hooks (Qdeferred_action_function); /* If there is a prefix argument, 1) We don't want Vlast_command to be ``universal-argument'' @@ -1621,7 +1614,10 @@ command_loop_1 (void) } if (current_buffer != prev_buffer || MODIFF != prev_modiff) - call1 (Vrun_hooks, intern ("activate-mark-hook")); + { + Lisp_Object hook = intern ("activate-mark-hook"); + Frun_hooks (1, &hook); + } } Vsaved_region_selection = Qnil; @@ -1819,9 +1815,7 @@ adjust_point_for_property (EMACS_INT last_pt, int modified) static Lisp_Object safe_run_hooks_1 (void) { - if (NILP (Vrun_hooks)) - return Qnil; - return call1 (Vrun_hooks, Vinhibit_quit); + return Frun_hooks (1, &Vinhibit_quit); } /* Subroutine for safe_run_hooks: handle an error by clearing out the hook. */ @@ -10129,11 +10123,11 @@ a special event, so ignore the prefix argument and don't clear it. */) if (SYMBOLP (cmd)) { tem = Fget (cmd, Qdisabled); - if (!NILP (tem) && !NILP (Vrun_hooks)) + if (!NILP (tem)) { tem = Fsymbol_value (Qdisabled_command_function); if (!NILP (tem)) - return call1 (Vrun_hooks, Qdisabled_command_function); + return Frun_hooks (1, &Qdisabled_command_function); } } @@ -10617,6 +10611,7 @@ On such systems, Emacs starts a subshell instead of suspending. */) int old_height, old_width; int width, height; struct gcpro gcpro1; + Lisp_Object hook; if (tty_list && tty_list->next) error ("There are other tty frames open; close them before suspending Emacs"); @@ -10625,8 +10620,8 @@ On such systems, Emacs starts a subshell instead of suspending. */) CHECK_STRING (stuffstring); /* Run the functions in suspend-hook. */ - if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, intern ("suspend-hook")); + hook = intern ("suspend-hook"); + Frun_hooks (1, &hook); GCPRO1 (stuffstring); get_tty_size (fileno (CURTTY ()->input), &old_width, &old_height); @@ -10650,8 +10645,8 @@ On such systems, Emacs starts a subshell instead of suspending. */) change_frame_size (SELECTED_FRAME (), height, width, 0, 0, 0); /* Run suspend-resume-hook. */ - if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, intern ("suspend-resume-hook")); + hook = intern ("suspend-resume-hook"); + Frun_hooks (1, &hook); UNGCPRO; return Qnil; diff --git a/src/minibuf.c b/src/minibuf.c index b6b79be9d3f..7bed9bb2f2d 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -649,12 +649,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, if (STRINGP (input_method) && !NILP (Ffboundp (Qactivate_input_method))) call1 (Qactivate_input_method, input_method); - /* Run our hook, but not if it is empty. - (run-hooks would do nothing if it is empty, - but it's important to save time here in the usual case.) */ - if (!NILP (Vminibuffer_setup_hook) && !EQ (Vminibuffer_setup_hook, Qunbound) - && !NILP (Vrun_hooks)) - call1 (Vrun_hooks, Qminibuffer_setup_hook); + Frun_hooks (1, &Qminibuffer_setup_hook); /* Don't allow the user to undo past this point. */ BVAR (current_buffer, undo_list) = Qnil; @@ -806,10 +801,7 @@ get_minibuffer (int depth) static Lisp_Object run_exit_minibuf_hook (Lisp_Object data) { - if (!NILP (Vminibuffer_exit_hook) && !EQ (Vminibuffer_exit_hook, Qunbound) - && !NILP (Vrun_hooks)) - safe_run_hooks (Qminibuffer_exit_hook); - + safe_run_hooks (Qminibuffer_exit_hook); return Qnil; } diff --git a/src/term.c b/src/term.c index e84bbe125f8..b3392df76fd 100644 --- a/src/term.c +++ b/src/term.c @@ -2500,13 +2500,10 @@ A suspended tty may be resumed by calling `resume-tty' on it. */) /* First run `suspend-tty-functions' and then clean up the tty state because `suspend-tty-functions' might need to change the tty state. */ - if (!NILP (Vrun_hooks)) - { - Lisp_Object args[2]; - args[0] = intern ("suspend-tty-functions"); - XSETTERMINAL (args[1], t); - Frun_hook_with_args (2, args); - } + Lisp_Object args[2]; + args[0] = intern ("suspend-tty-functions"); + XSETTERMINAL (args[1], t); + Frun_hook_with_args (2, args); reset_sys_modes (t->display_info.tty); delete_keyboard_wait_descriptor (fileno (f)); @@ -2596,14 +2593,13 @@ frame's terminal). */) init_sys_modes (t->display_info.tty); - /* Run `resume-tty-functions'. */ - if (!NILP (Vrun_hooks)) - { - Lisp_Object args[2]; - args[0] = intern ("resume-tty-functions"); - XSETTERMINAL (args[1], t); - Frun_hook_with_args (2, args); - } + { + /* Run `resume-tty-functions'. */ + Lisp_Object args[2]; + args[0] = intern ("resume-tty-functions"); + XSETTERMINAL (args[1], t); + Frun_hook_with_args (2, args); + } } set_tty_hooks (t); diff --git a/src/window.c b/src/window.c index eaa910571e0..9ab9fab2c13 100644 --- a/src/window.c +++ b/src/window.c @@ -3690,27 +3690,23 @@ temp_output_buffer_show (register Lisp_Object buf) /* Run temp-buffer-show-hook, with the chosen window selected and its buffer current. */ + { + int count = SPECPDL_INDEX (); + Lisp_Object prev_window, prev_buffer; + prev_window = selected_window; + XSETBUFFER (prev_buffer, old); - if (!NILP (Vrun_hooks) - && !NILP (Fboundp (Qtemp_buffer_show_hook)) - && !NILP (Fsymbol_value (Qtemp_buffer_show_hook))) - { - int count = SPECPDL_INDEX (); - Lisp_Object prev_window, prev_buffer; - prev_window = selected_window; - XSETBUFFER (prev_buffer, old); - - /* Select the window that was chosen, for running the hook. - Note: Both Fselect_window and select_window_norecord may - set-buffer to the buffer displayed in the window, - so we need to save the current buffer. --stef */ - record_unwind_protect (Fset_buffer, prev_buffer); - record_unwind_protect (select_window_norecord, prev_window); - Fselect_window (window, Qt); - Fset_buffer (w->buffer); - call1 (Vrun_hooks, Qtemp_buffer_show_hook); - unbind_to (count, Qnil); - } + /* Select the window that was chosen, for running the hook. + Note: Both Fselect_window and select_window_norecord may + set-buffer to the buffer displayed in the window, + so we need to save the current buffer. --stef */ + record_unwind_protect (Fset_buffer, prev_buffer); + record_unwind_protect (select_window_norecord, prev_window); + Fselect_window (window, Qt); + Fset_buffer (w->buffer); + Frun_hooks (1, &Qtemp_buffer_show_hook); + unbind_to (count, Qnil); + } } } From def71b5e5b9f78a112e52201881aea631b7ebcde Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Wed, 23 Mar 2011 19:56:34 +0800 Subject: [PATCH 097/166] Tweak regexp in help-mode-finish Without this fix, "This special-form is advised." won't be correctly fontified. --- lisp/ChangeLog | 4 ++++ lisp/help-mode.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 603888477fb..a42eac0b725 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-23 Leo Liu + + * help-mode.el (help-mode-finish): Tweak regexp. + 2011-03-23 Glenn Morris * eshell/esh-opt.el (eshell-eval-using-options): diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 51d18235e1b..005358e3c7d 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -330,7 +330,7 @@ Commands: (save-excursion (goto-char (point-min)) (let ((inhibit-read-only t)) - (when (re-search-forward "^This \\w+ is advised.$" nil t) + (when (re-search-forward "^This [^[:space:]]+ is advised.$" nil t) (put-text-property (match-beginning 0) (match-end 0) 'face 'font-lock-warning-face)))) From 9c88f339493465e8e200b21885f2ac886b299169 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 23 Mar 2011 17:25:38 +0100 Subject: [PATCH 098/166] w32: Fix some warnings reported by -Wall -Wextra. * lib-src/ntlib.c: Include . * nt/cmdproxy.c: Include . (make_absolute): Remove unused variable `i'. * src/w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'. (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer. (Fx_close_connection): Remove unused variable `i'. * src/w32font.c (w32font_draw): Return number of glyphs. (w32font_open_internal): Remove unused variable `i'. (w32font_driver): Add missing initializer. * src/w32menu.c (utf8to16): Remove unused variable `utf16'. (fill_in_menu): Remove unused variable `items_added'. * src/w32term.c (last_mouse_press_frame): Remove static global variable. (w32_clip_to_row): Remove unused variable `f'. (x_delete_terminal): Remove unused variable `i'. * src/w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'. (NOTHING): Remove unused static global variable. (uniscribe_check_otf): Remove unused variable `table'. (uniscribe_font_driver): Add missing initializers. --- lib-src/ChangeLog | 4 ++++ lib-src/ntlib.c | 1 + nt/ChangeLog | 5 +++++ nt/cmdproxy.c | 2 +- src/ChangeLog | 22 ++++++++++++++++++++++ src/w32fns.c | 4 +--- src/w32font.c | 10 +++++++--- src/w32menu.c | 3 --- src/w32term.c | 3 --- src/w32uniscribe.c | 11 ++++++----- 10 files changed, 47 insertions(+), 18 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 0e46a83aafa..672fe8c8541 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-23 Juanma Barranquero + + * ntlib.c: Include . + 2011-03-23 Glenn Morris * Makefile.in ($(DESTDIR)${archlibdir}): diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c index 0ecd4177d2c..83f653f3ea3 100644 --- a/lib-src/ntlib.c +++ b/lib-src/ntlib.c @@ -28,6 +28,7 @@ along with GNU Emacs. If not, see . #include #include #include +#include #include "ntlib.h" diff --git a/nt/ChangeLog b/nt/ChangeLog index e55fc52a487..657b4c7a10f 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2011-03-23 Juanma Barranquero + + * cmdproxy.c: Include . + (make_absolute): Remove unused variable `i'. + 2011-02-27 Eli Zaretskii * inc/unistd.h (readlink, symlink): Declare prototypes. diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c index 9a98e1e5034..b9572570c5f 100644 --- a/nt/cmdproxy.c +++ b/nt/cmdproxy.c @@ -33,6 +33,7 @@ along with GNU Emacs. If not, see . */ #include /* alloca */ #include /* getenv */ #include /* strlen */ +#include /* isspace, isalpha */ /* We don't want to include stdio.h because we are already duplicating lots of it here */ @@ -251,7 +252,6 @@ make_absolute (const char *prog) char curdir[MAX_PATH]; char *p, *path; const char *fname; - int i; /* At least partial absolute path specified; search there. */ if ((isalpha (prog[0]) && prog[1] == ':') || diff --git a/src/ChangeLog b/src/ChangeLog index f9766115042..b306ff78ff9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,25 @@ +2011-03-23 Juanma Barranquero + + * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'. + (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer. + (Fx_close_connection): Remove unused variable `i'. + + * w32font.c (w32font_draw): Return number of glyphs. + (w32font_open_internal): Remove unused variable `i'. + (w32font_driver): Add missing initializer. + + * w32menu.c (utf8to16): Remove unused variable `utf16'. + (fill_in_menu): Remove unused variable `items_added'. + + * w32term.c (last_mouse_press_frame): Remove static global variable. + (w32_clip_to_row): Remove unused variable `f'. + (x_delete_terminal): Remove unused variable `i'. + + * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'. + (NOTHING): Remove unused static global variable. + (uniscribe_check_otf): Remove unused variable `table'. + (uniscribe_font_driver): Add missing initializers. + 2011-03-23 Julien Danjou * term.c (Fsuspend_tty, Fresume_tty): diff --git a/src/w32fns.c b/src/w32fns.c index 0c899cdceff..d833f9d550f 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -1527,7 +1527,6 @@ void x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) { int nlines; - int olines = FRAME_MENU_BAR_LINES (f); /* Right now, menu bars don't work properly in minibuf-only frames; most of the commands try to apply themselves to the minibuffer @@ -2951,7 +2950,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) HIMC context = get_ime_context_fn (hwnd); wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam); /* Get buffer size. */ - size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, 0); + size = get_composition_string_fn (context, GCS_RESULTSTR, NULL, 0); buffer = alloca (size); size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, size); @@ -4820,7 +4819,6 @@ If DISPLAY is nil, that stands for the selected frame's display. */) (Lisp_Object display) { struct w32_display_info *dpyinfo = check_x_display_info (display); - int i; if (dpyinfo->reference_count > 0) error ("Display still has frames on it"); diff --git a/src/w32font.c b/src/w32font.c index 40ff0782b88..d86107bc6d5 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -533,6 +533,7 @@ w32font_draw (struct glyph_string *s, int from, int to, { UINT options; HRGN orig_clip = NULL; + int len = to - from; struct w32font_info *w32font = (struct w32font_info *) s->font; options = w32font->glyph_idx; @@ -581,14 +582,14 @@ w32font_draw (struct glyph_string *s, int from, int to, if (s->padding_p) { - int len = to - from, i; + int i; for (i = 0; i < len; i++) ExtTextOutW (s->hdc, x + i, y, options, NULL, s->char2b + from + i, 1, NULL); } else - ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, to - from, NULL); + ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, len, NULL); /* Restore clip region. */ if (s->num_clips > 0) @@ -596,6 +597,8 @@ w32font_draw (struct glyph_string *s, int from, int to, if (orig_clip) DeleteObject (orig_clip); + + return len; } /* w32 implementation of free_entity for font backend. @@ -774,7 +777,7 @@ int w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity, int pixel_size, Lisp_Object font_object) { - int len, size, i; + int len, size; LOGFONT logfont; HDC dc; HFONT hfont, old_font; @@ -2418,6 +2421,7 @@ struct font_driver w32font_driver = NULL, /* check */ NULL, /* get_variation_glyphs */ w32font_filter_properties, + NULL, /* cached_font_ok */ }; diff --git a/src/w32menu.c b/src/w32menu.c index a2e62f24f6a..c363fdd72cb 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1320,7 +1320,6 @@ utf8to16 (unsigned char * src, int len, WCHAR * dest) { while (len > 0) { - int utf16; if (*src < 0x80) { *dest = (WCHAR) *src; @@ -1546,8 +1545,6 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) static int fill_in_menu (HMENU menu, widget_value *wv) { - int items_added = 0; - for ( ; wv != NULL; wv = wv->next) { if (wv->contents) diff --git a/src/w32term.c b/src/w32term.c index f31c4e90e77..56454faddb9 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -160,7 +160,6 @@ int last_scroll_bar_drag_pos; /* Where the mouse was last time we reported a mouse event. */ static RECT last_mouse_glyph; static FRAME_PTR last_mouse_glyph_frame; -static Lisp_Object last_mouse_press_frame; /* The scroll bar in which the last motion event occurred. @@ -4842,7 +4841,6 @@ w32_read_socket (struct terminal *terminal, int expected, static void w32_clip_to_row (struct window *w, struct glyph_row *row, int area, HDC hdc) { - struct frame *f = XFRAME (WINDOW_FRAME (w)); RECT clip_rect; int window_x, window_y, window_width; @@ -6089,7 +6087,6 @@ static void x_delete_terminal (struct terminal *terminal) { struct w32_display_info *dpyinfo = terminal->display_info.w32; - int i; /* Protect against recursive calls. delete_frame in delete_terminal calls us back when it deletes our last frame. */ diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 39d1ee5c851..f6347bb88f7 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c @@ -320,7 +320,7 @@ uniscribe_shape (Lisp_Object lgstring) } if (SUCCEEDED (result)) { - int j, nclusters, from, to; + int j, from, to; from = 0; to = from; @@ -629,8 +629,6 @@ add_opentype_font_name_to_list (ENUMLOGFONTEX *logical_font, STR[4] = '\0'; \ } while (0) -static char* NOTHING = " "; - #define SNAME(VAL) SDATA (SYMBOL_NAME (VAL)) /* Check if font supports the otf script/language/features specified. @@ -646,7 +644,6 @@ uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec) struct frame * f; HDC context; HFONT check_font, old_font; - DWORD table; int i, retval = 0; struct gcpro gcpro1; @@ -936,7 +933,11 @@ struct font_driver uniscribe_font_driver = NULL, /* otf_drive - use shape instead. */ NULL, /* start_for_frame */ NULL, /* end_for_frame */ - uniscribe_shape + uniscribe_shape, + NULL, /* check */ + NULL, /* get_variation_glyphs */ + NULL, /* filter_properties */ + NULL, /* cached_font_ok */ }; /* Note that this should be called at every startup, not just when dumping, From cb5af48e50b716a2ee017e29a3e88edcf17e276f Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Thu, 24 Mar 2011 02:11:15 +0800 Subject: [PATCH 099/166] Move abbrevlist.el to obsolete/abbrevlist.el --- lisp/ChangeLog | 2 ++ lisp/{ => obsolete}/abbrevlist.el | 1 + 2 files changed, 3 insertions(+) rename lisp/{ => obsolete}/abbrevlist.el (98%) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a42eac0b725..af2d4ee5a8e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2011-03-23 Leo Liu + * abbrevlist.el: Move to obsolete/abbrevlist.el. + * help-mode.el (help-mode-finish): Tweak regexp. 2011-03-23 Glenn Morris diff --git a/lisp/abbrevlist.el b/lisp/obsolete/abbrevlist.el similarity index 98% rename from lisp/abbrevlist.el rename to lisp/obsolete/abbrevlist.el index 79080780005..55940dfc1ce 100644 --- a/lisp/abbrevlist.el +++ b/lisp/obsolete/abbrevlist.el @@ -6,6 +6,7 @@ ;; Maintainer: FSF ;; Keywords: abbrev ;; Package: emacs +;; Obsolete-since: 24.1 ;; This file is part of GNU Emacs. From 1149507c7fe8c24d93448eea2d0114746c580782 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 24 Mar 2011 03:30:26 +0100 Subject: [PATCH 100/166] src/w32term.c (x_set_glyph_string_clipping): Don't pass uninitialized region to CombineRgn. --- src/ChangeLog | 5 +++++ src/w32term.c | 12 ++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b306ff78ff9..ae40e4638fa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-24 Juanma Barranquero + + * w32term.c (x_set_glyph_string_clipping): + Don't pass uninitialized region to CombineRgn. + 2011-03-23 Juanma Barranquero * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'. diff --git a/src/w32term.c b/src/w32term.c index 56454faddb9..2252c930711 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1068,16 +1068,12 @@ x_set_glyph_string_clipping (struct glyph_string *s) w32_set_clip_rectangle (s->hdc, r); else if (n > 1) { - HRGN full_clip, clip1, clip2; - clip1 = CreateRectRgnIndirect (r); - clip2 = CreateRectRgnIndirect (r + 1); - if (CombineRgn (full_clip, clip1, clip2, RGN_OR) != ERROR) - { - SelectClipRgn (s->hdc, full_clip); - } + HRGN clip1 = CreateRectRgnIndirect (r); + HRGN clip2 = CreateRectRgnIndirect (r + 1); + if (CombineRgn (clip1, clip1, clip2, RGN_OR) != ERROR) + SelectClipRgn (s->hdc, clip1); DeleteObject (clip1); DeleteObject (clip2); - DeleteObject (full_clip); } s->num_clips = n; } From 44f730c85e90d32d205e4d6ea2284de2eda4aacf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 23 Mar 2011 21:17:44 -0700 Subject: [PATCH 101/166] * xselect.c (x_check_property_data): Return correct size (Bug#8335). --- src/ChangeLog | 4 ++++ src/xselect.c | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a8bda0915f6..cdde9673fbd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-24 Paul Eggert + + * xselect.c (x_check_property_data): Return correct size (Bug#8335). + 2011-03-23 Paul Eggert * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow diff --git a/src/xselect.c b/src/xselect.c index 5254fa96838..451b2a0b13f 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2190,7 +2190,8 @@ and t is the same as `SECONDARY'. */) ***********************************************************************/ /* Check that lisp values are of correct type for x_fill_property_data. That is, number, string or a cons with two numbers (low and high 16 - bit parts of a 32 bit number). */ + bit parts of a 32 bit number). Return the number of items in DATA, + or -1 if there is an error. */ int x_check_property_data (Lisp_Object data) @@ -2198,15 +2199,16 @@ x_check_property_data (Lisp_Object data) Lisp_Object iter; int size = 0; - for (iter = data; CONSP (iter) && size != -1; iter = XCDR (iter), ++size) + for (iter = data; CONSP (iter); iter = XCDR (iter)) { Lisp_Object o = XCAR (iter); if (! NUMBERP (o) && ! STRINGP (o) && ! CONSP (o)) - size = -1; + return -1; else if (CONSP (o) && (! NUMBERP (XCAR (o)) || ! NUMBERP (XCDR (o)))) - size = -1; + return -1; + size++; } return size; From 03d0a10961746346940115a5ff1779f4e7a455f7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 24 Mar 2011 00:36:32 -0700 Subject: [PATCH 102/166] * image.c (tiff_load): Fix off-by-one image count (Bug#8336). --- src/ChangeLog | 2 ++ src/image.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cdde9673fbd..998e2014c69 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-24 Paul Eggert + * image.c (tiff_load): Fix off-by-one image count (Bug#8336). + * xselect.c (x_check_property_data): Return correct size (Bug#8335). 2011-03-23 Paul Eggert diff --git a/src/image.c b/src/image.c index 7584f9bb2c0..695ac143fde 100644 --- a/src/image.c +++ b/src/image.c @@ -6754,7 +6754,7 @@ tiff_load (struct frame *f, struct image *img) TIFF *tiff; int width, height, x, y, count; uint32 *buf; - int rc, rc2; + int rc; XImagePtr ximg; tiff_memory_source memsrc; Lisp_Object image; @@ -6842,8 +6842,8 @@ tiff_load (struct frame *f, struct image *img) rc = fn_TIFFReadRGBAImage (tiff, width, height, buf, 0); /* Count the number of images in the file. */ - for (count = 1, rc2 = 1; rc2; count++) - rc2 = fn_TIFFSetDirectory (tiff, count); + for (count = 1; fn_TIFFSetDirectory (tiff, count); count++) + continue; if (count > 1) img->data.lisp_val = Fcons (Qcount, From 9a2c6e0545bc418137abab8fb675f53c4f461853 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 24 Mar 2011 01:03:03 -0700 Subject: [PATCH 103/166] * keyboard.c (syms_of_keyboard): Use the same style as later in this function when indexing through an array. This also works around GCC bug 48267. --- src/ChangeLog | 4 ++++ src/keyboard.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 998e2014c69..88190f46179 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-24 Paul Eggert + * keyboard.c (syms_of_keyboard): Use the same style as later + in this function when indexing through an array. This also + works around GCC bug 48267. + * image.c (tiff_load): Fix off-by-one image count (Bug#8336). * xselect.c (x_check_property_data): Return correct size (Bug#8335). diff --git a/src/keyboard.c b/src/keyboard.c index fc8622de0a1..72d955637b3 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -11574,12 +11574,12 @@ syms_of_keyboard (void) last_point_position_window = Qnil; { - const struct event_head *p; + int i; + int len = sizeof (head_table) / sizeof (head_table[0]); - for (p = head_table; - p < head_table + (sizeof (head_table) / sizeof (head_table[0])); - p++) + for (i = 0; i < len; i++) { + const struct event_head *p = &head_table[i]; *p->var = intern_c_string (p->name); staticpro (p->var); Fput (*p->var, Qevent_kind, *p->kind); From e8974c48ae2f265555c7772ea0989fca5e4158b8 Mon Sep 17 00:00:00 2001 From: Drew Adams Date: Fri, 25 Mar 2011 00:38:12 +0800 Subject: [PATCH 104/166] Add support for defun in thingatpt.el --- lisp/ChangeLog | 4 ++++ lisp/thingatpt.el | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index af2d4ee5a8e..5d6b203aea2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-24 Drew Adams + + * thingatpt.el: Support `defun'. + 2011-03-23 Leo Liu * abbrevlist.el: Move to obsolete/abbrevlist.el. diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 020faa197cd..a56c3e4d501 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -207,6 +207,12 @@ a symbol as a valid THING." (cons opoint end)))) (error nil))))) +;; Defuns + +(put 'defun 'beginning-op 'beginning-of-defun) +(put 'defun 'end-op 'end-of-defun) +(put 'defun 'forward-op 'end-of-defun) + ;; Filenames and URLs www.com/foo%32bar (defvar thing-at-point-file-name-chars "-~/[:alnum:]_.${}#%,:" From d86d2721aa386e943f159895afc4bf2fd53eafd9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 24 Mar 2011 18:05:01 -0400 Subject: [PATCH 105/166] First step towards using standard completion in comint. * lisp/minibuffer.el (completion--flush-all-sorted-completions): Remove itself from hook. (completion-at-point): Let the functions perform the completion immediately and return nil or t. * lisp/comint.el (comint-dynamic-complete-functions): Now identical to completion-at-point-functions. (comint-dynamic-list-input-ring): Remove unused var `index'. (comint--match-partial-filename, comint--unquote&expand-filename): New funs, split from comint-match-partial-filename. (comint-dynamic-complete): Use completion-at-point. (comint-dynamic-complete-filename): Use comint--match-partial-filename. --- lisp/ChangeLog | 38 ++++++++++++++++++++++++----------- lisp/comint.el | 50 ++++++++++++++++++++++++---------------------- lisp/minibuffer.el | 13 +++++++++--- 3 files changed, 62 insertions(+), 39 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5d6b203aea2..d2403f0e53e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2011-03-24 Stefan Monnier + + * minibuffer.el (completion--flush-all-sorted-completions): + Remove itself from hook. + (completion-at-point): Let the functions perform the completion + immediately and return nil or t. + * comint.el (comint-dynamic-complete-functions): Now identical to + completion-at-point-functions. + (comint-dynamic-list-input-ring): Remove unused var `index'. + (comint--match-partial-filename, comint--unquote&expand-filename): + New funs, split from comint-match-partial-filename. + (comint-dynamic-complete): Use completion-at-point. + (comint-dynamic-complete-filename): Use comint--match-partial-filename. + 2011-03-24 Drew Adams * thingatpt.el: Support `defun'. @@ -52,8 +66,8 @@ (provide-theme): Ignore custom--inhibit-theme-enable. (load-theme): Enable the theme explicitly if NO-ENABLE is non-nil. (custom-enabling-themes): Delete variable. - (enable-theme): Accept only loaded themes as arguments. Ignore - the special custom-enabled-themes variable. + (enable-theme): Accept only loaded themes as arguments. + Ignore the special custom-enabled-themes variable. (custom-enabled-themes): Forbid themes from setting this. Eliminate use of custom-enabling-themes. (custom-push-theme): Quote "changed" custom var entry. @@ -390,8 +404,8 @@ 2011-03-09 Michael Albinus - * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do - not use `tramp-file-name-port', because this returns also + * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): + Do not use `tramp-file-name-port', because this returns also `tramp-default-port'. 2011-03-09 Deniz Dogan @@ -420,8 +434,8 @@ * emacs-lisp/package.el (package-tar-file-info): Handle also remote files. - * emacs-lisp/package-x.el (package-upload-buffer-internal): Use - `equal' for upload base check. + * emacs-lisp/package-x.el (package-upload-buffer-internal): + Use `equal' for upload base check. 2011-03-08 Arni Magnusson (tiny change) @@ -750,9 +764,9 @@ 2011-03-03 Christian Ohler * emacs-lisp/ert.el (ert--explain-equal): New function. - (ert--explain-equal-rec): Renamed from `ert--explain-not-equal'. + (ert--explain-equal-rec): Rename from `ert--explain-not-equal'. All callers changed. - (ert--explain-equal-including-properties): Renamed from + (ert--explain-equal-including-properties): Rename from `ert--explain-not-equal-including-properties'. All callers changed. @@ -8275,8 +8289,8 @@ Sync with Tramp 2.1.19. - * net/tramp-gvfs.el (tramp-gvfs-handle-write-region): Protect - deleting tmpfile. + * net/tramp-gvfs.el (tramp-gvfs-handle-write-region): + Protect deleting tmpfile. (tramp-gvfs-maybe-open-connection): Use `tramp-compat-funcall'. * net/tramp.el (tramp-handle-expand-file-name) @@ -10554,8 +10568,8 @@ * net/tramp-ftp.el (tramp-ftp-file-name-handler): Use `delete-file' instead of `tramp-compat-delete-file'. - * net/tramp-gvfs.el (tramp-gvfs-handle-write-region): Use - `delete-file' instead of `tramp-compat-delete-file'. + * net/tramp-gvfs.el (tramp-gvfs-handle-write-region): + Use `delete-file' instead of `tramp-compat-delete-file'. * net/tramp-imap.el (tramp-imap-do-copy-or-rename-file): Use `delete-file' instead of `tramp-compat-delete-file'. diff --git a/lisp/comint.el b/lisp/comint.el index 711ebce20a3..c9d2108f132 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -368,7 +368,7 @@ text matching `comint-prompt-regexp', depending on the value of (defvar comint-dynamic-complete-functions '(comint-replace-by-expanded-history comint-dynamic-complete-filename) "List of functions called to perform completion. -Functions should return non-nil if completion was performed. +Works like `completion-at-point-functions'. See also `comint-dynamic-complete'. This is a good thing to set in mode hooks.") @@ -1008,7 +1008,6 @@ See also `comint-read-input-ring'." (message "No history") (let ((history nil) (history-buffer " *Input History*") - (index (1- (ring-length comint-input-ring))) (conf (current-window-configuration))) ;; We have to build up a list ourselves from the ring vector. (dotimes (index (ring-length comint-input-ring)) @@ -2946,13 +2945,22 @@ interpreter (e.g., the percent notation of cmd.exe on NT)." (setq name (replace-match env-var-val t t name)))))) name)) -(defun comint-match-partial-filename () - "Return the filename at point, or nil if none is found. -Environment variables are substituted. See `comint-word'." - (let ((filename (comint-word comint-file-name-chars))) - (and filename (comint-substitute-in-file-name - (comint-unquote-filename filename))))) +(defun comint--match-partial-filename () + "Return the filename at point as-is, or nil if none is found. +See `comint-word'." + (comint-word comint-file-name-chars)) +(defun comint--unquote&expand-filename (filename) + ;; FIXME: The code below does unquote-then-expand which means that "\\$HOME" + ;; gets expanded to the same as "$HOME" + (comint-substitute-in-file-name + (comint-unquote-filename filename))) + +(defun comint-match-partial-filename () + "Return the unquoted&expanded filename at point, or nil if none is found. +Environment variables are substituted. See `comint-word'." + (let ((filename (comint--match-partial-filename))) + (and filename (comint--unquote&expand-filename filename)))) (defun comint-quote-filename (filename) "Return FILENAME with magic characters quoted. @@ -2987,13 +2995,13 @@ Calls the functions in `comint-dynamic-complete-functions' to perform completion until a function returns non-nil, at which point completion is assumed to have occurred." (interactive) - (run-hook-with-args-until-success 'comint-dynamic-complete-functions)) + (let ((completion-at-point-functions comint-dynamic-complete-functions)) + (completion-at-point))) (defun comint-dynamic-complete-filename () "Dynamically complete the filename at point. -Completes if after a filename. See `comint-match-partial-filename' and -`comint-dynamic-complete-as-filename'. +Completes if after a filename. This function is similar to `comint-replace-by-expanded-filename', except that it won't change parts of the filename already entered in the buffer; it just adds completion characters to the end of the filename. A completions listing @@ -3005,7 +3013,7 @@ completions listing is dependent on the value of `comint-completion-autolist'. Returns t if successful." (interactive) - (when (comint-match-partial-filename) + (when (comint--match-partial-filename) (unless (window-minibuffer-p (selected-window)) (message "Completing file name...")) (comint-dynamic-complete-as-filename))) @@ -3021,18 +3029,12 @@ See `comint-dynamic-complete-filename'. Returns t if successful." ;;(file-name-handler-alist nil) (minibuffer-p (window-minibuffer-p (selected-window))) (success t) - (dirsuffix (cond ((not comint-completion-addsuffix) - "") - ((not (consp comint-completion-addsuffix)) - "/") - (t - (car comint-completion-addsuffix)))) - (filesuffix (cond ((not comint-completion-addsuffix) - "") - ((not (consp comint-completion-addsuffix)) - " ") - (t - (cdr comint-completion-addsuffix)))) + (dirsuffix (cond ((not comint-completion-addsuffix) "") + ((not (consp comint-completion-addsuffix)) "/") + (t (car comint-completion-addsuffix)))) + (filesuffix (cond ((not comint-completion-addsuffix) "") + ((not (consp comint-completion-addsuffix)) " ") + (t (cdr comint-completion-addsuffix)))) (filename (comint-match-partial-filename)) (filename-beg (if filename (match-beginning 0) (point))) (filename-end (if filename (match-end 0) (point))) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index e541be9fdd9..f1bc9f2d6d5 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -688,6 +688,8 @@ scroll the window of possible completions." (t t))))) (defun completion--flush-all-sorted-completions (&rest ignore) + (remove-hook 'after-change-functions + 'completion--flush-all-sorted-completions t) (setq completion-cycling nil) (setq completion-all-sorted-completions nil)) @@ -1242,6 +1244,8 @@ Point needs to be somewhere between START and END." (assert (<= start (point)) (<= (point) end)) ;; FIXME: undisplay the *Completions* buffer once the completion is done. (with-wrapper-hook + ;; FIXME: Maybe we should use this hook to provide a "display + ;; completions" operation as well. completion-in-region-functions (start end collection predicate) (let ((minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) @@ -1253,7 +1257,9 @@ Point needs to be somewhere between START and END." (defvar completion-at-point-functions '(tags-completion-at-point-function) "Special hook to find the completion table for the thing at point. -It is called without any argument and should return either nil, +Each function on this hook is called in turns without any argument and should +return either nil to mean that it is not applicable at point, +or t to mean that it already performed completion (discouraged), or a function of no argument to perform completion (discouraged), or a list of the form (START END COLLECTION &rest PROPS) where START and END delimit the entity to complete and should include point, @@ -1271,7 +1277,7 @@ The completion method is determined by `completion-at-point-functions'." 'completion-at-point-functions))) (cond ((functionp res) (funcall res)) - (res + ((consp res) (let* ((plist (nthcdr 3 res)) (start (nth 0 res)) (end (nth 1 res)) @@ -1279,7 +1285,8 @@ The completion method is determined by `completion-at-point-functions'." (or (plist-get plist :annotation-function) completion-annotate-function))) (completion-in-region start end (nth 2 res) - (plist-get plist :predicate))))))) + (plist-get plist :predicate)))) + (res)))) ;Maybe completion already happened and the function returned t. ;;; Key bindings. From c5b40130ec56efef7b99b7b7ad249091773dfe87 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Fri, 25 Mar 2011 08:42:26 +0800 Subject: [PATCH 106/166] Some ido cleanups * ido.el (ido-read-internal): Simplify with read-from-minibuffer. (ido-completions): Remove unused arguments. (Bug#8329) --- lisp/ChangeLog | 5 +++++ lisp/ido.el | 33 ++++++++++----------------------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d2403f0e53e..f07ac0953ff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-25 Leo Liu + + * ido.el (ido-read-internal): Simplify with read-from-minibuffer. + (ido-completions): Remove unused arguments. (Bug#8329) + 2011-03-24 Stefan Monnier * minibuffer.el (completion--flush-all-sorted-completions): diff --git a/lisp/ido.el b/lisp/ido.el index df7516993b7..177f9338870 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1964,17 +1964,9 @@ If INITIAL is non-nil, it specifies the initial input string." (ido-set-matches) (if (and ido-matches (eq ido-try-merged-list 'auto)) (setq ido-try-merged-list t)) - (let - ((minibuffer-local-completion-map - (if (memq ido-cur-item '(file dir)) - minibuffer-local-completion-map - ido-completion-map)) - (minibuffer-local-filename-completion-map - (if (memq ido-cur-item '(file dir)) - ido-completion-map - minibuffer-local-filename-completion-map)) - (max-mini-window-height (or ido-max-window-height - (and (boundp 'max-mini-window-height) max-mini-window-height))) + (let ((max-mini-window-height (or ido-max-window-height + (and (boundp 'max-mini-window-height) + max-mini-window-height))) (ido-completing-read t) (ido-require-match require-match) (ido-use-mycompletion-depth (1+ (minibuffer-depth))) @@ -1985,12 +1977,11 @@ If INITIAL is non-nil, it specifies the initial input string." (setq ido-exit nil) (setq ido-final-text (catch 'ido - (completing-read-default - (ido-make-prompt item prompt) - '(("dummy" . 1)) nil nil ; table predicate require-match - (prog1 ido-text-init (setq ido-text-init nil)) ;initial-contents - history)))) - (ido-trace "completing-read" ido-final-text) + (read-from-minibuffer (ido-make-prompt item prompt) + (prog1 ido-text-init + (setq ido-text-init nil)) + ido-completion-map nil history)))) + (ido-trace "read-from-minibuffer" ido-final-text) (if (get-buffer ido-completion-buffer) (kill-buffer ido-completion-buffer)) @@ -4494,17 +4485,13 @@ For details of keybindings, see `ido-find-file'." ;; Insert the match-status information: (ido-set-common-completion) - (let ((inf (ido-completions - contents - minibuffer-completion-table - minibuffer-completion-predicate - (not minibuffer-completion-confirm)))) + (let ((inf (ido-completions contents))) (setq ido-show-confirm-message nil) (ido-trace "inf" inf) (insert inf)) )))) -(defun ido-completions (name candidates predicate require-match) +(defun ido-completions (name) ;; Return the string that is displayed after the user's text. ;; Modified from `icomplete-completions'. From 577c4ec0579864e6e2e243e64cc6662c9fcc8bce Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 25 Mar 2011 00:00:36 -0700 Subject: [PATCH 107/166] * admin/notes/copyright: Remove info on some files no longer present. --- admin/notes/copyright | 65 ++++++------------------------------------- 1 file changed, 8 insertions(+), 57 deletions(-) diff --git a/admin/notes/copyright b/admin/notes/copyright index adc12f0bfb5..39eb003a07d 100644 --- a/admin/notes/copyright +++ b/admin/notes/copyright @@ -120,7 +120,10 @@ or even ChangeLogs, for older changes. People often installed changes from others, without recording the true authorship. [For reference, most of these points were established via email with -rms, 2007/1, "Copyright years".] +rms, 2007/1, "Copyright years". + +In March 2011, information on some files no longer included was removed. +Consult older versions of this document if interested.] lisp/version.el # emacs-copyright @@ -146,13 +149,6 @@ install-sh etc/refcards/*.tex also update the \def\year macro for the latest year. -etc/BABYL, ms-kermit - no notices (see below). - -etc/emacs.csh - - written by Michael DeCorte, who has no assignment. But trivial - enough to not need license. - etc/future-bug - doesn't need a humorless disclaimer, because Karl Fogel says we can consider it part of Emacs, and he has a blanker disclaimer for @@ -385,9 +381,9 @@ Makefile.in does now. src/gmalloc.c - contains numerous copyrights from the GNU C library. Leave them alone. -src/acldef.h, chpdef.h, ndir.h - - see comments below. These files are OK to be released with Emacs - 22, but we may want to revisit them afterwards. +src/ndir.h + - see comments below. This file is OK to be released with Emacs + 22, but we may want to revisit it afterwards. ** Some notes on resolved issues, for historical information only @@ -398,15 +394,6 @@ which year, I can probably tell you which.) Either way, we have papers for it." It was present in Emacs-16.56 (15-jul-85). rms: "Then I conclude it was written by me." -etc/ulimit.hack - Very obsolete file removed March 2007. Doesn't say who the author -is, but web-search suggests Karl Kleinpaste, who has no Emacs -assignment. Trivial anyway. -http://groups.google.com/group/comp.unix.shell/browse_thread/thread/bf3df496994\ -9f1df/7e5922c67b3a98fb -http://groups.google.com/group/comp.unix.questions/msg/cc7e49cacfd1ccb4 - (original 1987 source) - lisp/term/README - had no copyright notice till Feb 2007. ChangeLog.3 suggests it was written by Eric Raymond. When asked by rms on 14 Feb 2007 he said: @@ -427,20 +414,6 @@ src/unexhp9k800.c HP. So this file is public domain. -K Rodgers changes - It was pointed out that K Rodgers only had assigments for VC and - ps-print, but had changed several other files. We tried to contact - him for a general assignment, but he proved uncommunicative (despite - initially indicating to rms he would sign an assignment). As a result, his - changes were removed and/or rewritten independently. For details, see - threads: -http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00225.html -http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00257.html - - But then an assignment arrived before the release of Emacs 22: -http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01427.html - - lisp/progmodes/python.el Dave Love alerted us to a potential legal problem: http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-04/msg00459.html @@ -456,14 +429,8 @@ http://lists.gnu.org/archive/html/emacs-devel/2007-05/msg00466.html admin/check-doc-strings File says it's in the public domain, but that might not make it so. -etc/BABYL - File written long ago by authors with no assignment. Keep them - without notices for now, try and contact authors if possible. Be - ready to remove these files if the authors ever object. - -etc/ms-kermit etc/e/eterm-color.ti -src/acldef.h, chpdef.h, ndir.h +src/ndir.h On legal advice from Matt Norwood, the following comment was added to these files in Feb/Mar 2007: @@ -476,22 +443,6 @@ src/acldef.h, chpdef.h, ndir.h and possibly add a list of all authors who have changed these files. (details in email from Matt Norwood to rms, 2007/02/03). -etc/ms-7bkermit - Says it was written by Andy Lowry and Joel Spolsky. No entry for -either in copyright.list. NB this file is not "constrained" like -ms-kermit (rms: "We know it isn't. A comment at the front says it has -other bindings which might be handy."). File removed March 2007. -Re-add if clear up status at some point. - -etc/Xkeymap.txt - No info on author. File removed March 2007. rms: "It says it is -RLK's way of remapping his keyboard, so it is not constrained. I think -it was written by RLK. Let's delete it; if we contact RLK again, we -can put it back." Actually, RLK == Robert Krawitz has an Emacs -assignment. So this could be restored if it is still useful, but Jan Djärv -says it is obsolete: - - src/s/aix3-2.h, hpux8.h, hpux9.h, irix5-0.h, netbsd.h, usg5-4-2.h [note some of these have since been merged into other files] - all these (not obviously trivial) files were missing copyrights From f6ca84c095f29a92f5e651c7ec4f7abec7e5bc43 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 25 Mar 2011 00:14:31 -0700 Subject: [PATCH 108/166] Remove some files that autoreconf can supply. Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00863.html * compile, config.guess, config.sub, depcomp, install-sh, missing: Remove; autoreconf can supply them. * Makefile.in (sync-from-gnulib): Don't sync config.sub, config.guess, install-sh. Pass -i to autoreconf. * autogen/update_autogen (genfiles): Add compile, config.guess, config.sub, depcomp, install-sh, missing. Pass -i to autoreconf. Discard non-error output from autoreconf in -q case. * autogen/compile, autogen/config.guess, autogen/config.sub: * autogen/depcomp, autogen/install-sh, autogen/missing: New files. * autogen/copy_autogen: Add compile, config.guess, config.sub, depcomp, install-sh, missing. * autogen/README: Add compile, config.guess, config.sub, depcomp, install-sh, missing. * INSTALL.BZR, admin/make-tarball.txt: Add -i to autoreconf args. * .bzrignore: Add compile, config.guess, config.sub, depcomp, install-sh, missing. --- ChangeLog | 14 ++ INSTALL.BZR | 2 +- Makefile.in | 5 +- admin/make-tarball.txt | 2 +- autogen.sh | 4 +- autogen/README | 6 + compile => autogen/compile | 0 config.guess => autogen/config.guess | 352 ++++++++++++++------------- config.sub => autogen/config.sub | 142 ++++------- autogen/copy_autogen | 1 + depcomp => autogen/depcomp | 0 install-sh => autogen/install-sh | 29 +-- missing => autogen/missing | 0 autogen/update_autogen | 15 +- 14 files changed, 285 insertions(+), 287 deletions(-) rename compile => autogen/compile (100%) rename config.guess => autogen/config.guess (87%) rename config.sub => autogen/config.sub (93%) rename depcomp => autogen/depcomp (100%) rename install-sh => autogen/install-sh (95%) rename missing => autogen/missing (100%) diff --git a/ChangeLog b/ChangeLog index 5b953d4a87f..71c445bbe0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2011-03-25 Glenn Morris + + * compile, config.guess, config.sub, depcomp, install-sh, missing: + Remove; autoreconf can supply them. + * Makefile.in (sync-from-gnulib): Don't sync config.sub, + config.guess, install-sh. Pass -i to autoreconf. + * autogen/update_autogen (genfiles): Add compile, config.guess, + config.sub, depcomp, install-sh, missing. Pass -i to autoreconf. + Discard non-error output from autoreconf in -q case. + * autogen/compile, autogen/config.guess, autogen/config.sub: + * autogen/depcomp, autogen/install-sh, autogen/missing: New. + * autogen/copy_autogen: Add compile, config.guess, config.sub, depcomp, + install-sh, missing. + 2011-03-23 Glenn Morris * autogen/update_autogen: Fix typo. diff --git a/INSTALL.BZR b/INSTALL.BZR index 3859e3cd4fc..abb98fd796b 100644 --- a/INSTALL.BZR +++ b/INSTALL.BZR @@ -21,7 +21,7 @@ First, generate the `configure' script: $ ./autogen.sh -(or you can just run `autoreconf -I m4'). +(or you can just run `autoreconf -i -I m4'). You can then configure your build (use `./configure --help' to see options you can set): diff --git a/Makefile.in b/Makefile.in index c94d7a5445a..699589c6920 100644 --- a/Makefile.in +++ b/Makefile.in @@ -344,12 +344,9 @@ sync-from-gnulib: $(gnulib_srcdir) cd $(srcdir)/m4 && mv gnulib-comp.m4 $(DOS_gnulib_comp.m4) cp $(gnulib_srcdir)/build-aux/texinfo.tex $(srcdir)/doc/misc cp \ - $(gnulib_srcdir)/build-aux/config.sub \ - $(gnulib_srcdir)/build-aux/config.guess \ - $(gnulib_srcdir)/build-aux/install-sh \ $(gnulib_srcdir)/build-aux/move-if-change \ $(srcdir) - cd $(srcdir) && autoreconf -I m4 + cd $(srcdir) && autoreconf -i -I m4 .PHONY: sync-from-gnulib # These targets should be "${SUBDIR} without `src'". diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 9c47d6e1fa2..9a556520070 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -31,7 +31,7 @@ For each step, check for possible errors. 5. Edit configure.in so that maintainer-mode is off by default. (FIXME - need to find a better way of dealing with this). - autoreconf -I m4 --force + autoreconf -i -I m4 --force make bootstrap 6. Commit etc/AUTHORS, all the files changed by M-x set-version, and diff --git a/autogen.sh b/autogen.sh index 03c39ee9456..ce742a9c18a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -177,7 +177,7 @@ this script. If you know that the required versions are in your PATH, but this script has made an error, then you can simply run -autoreconf -I m4 +autoreconf -i -I m4 instead of this script. @@ -198,7 +198,7 @@ echo "Your system has the required tools, running autoreconf..." ## Let autoreconf figure out what, if anything, needs doing. -autoreconf -I m4 || exit $? +autoreconf -i -I m4 || exit $? echo "You can now run \`./configure'." diff --git a/autogen/README b/autogen/README index a16dc93c48a..fd574c41cd6 100644 --- a/autogen/README +++ b/autogen/README @@ -7,6 +7,12 @@ configure ../ autoconf config.in ../src autoheader * also used by MSDOS bzr build aclocal.m4 ../ aclocal Makefile.in ../lib automake +compile ../ automake +config.guess ../ automake +config.sub ../ automake +depcomp ../ automake +install-sh ../ automake +missing ../ automake There are also some scripts: diff --git a/compile b/autogen/compile similarity index 100% rename from compile rename to autogen/compile diff --git a/config.guess b/autogen/config.guess similarity index 87% rename from config.guess rename to autogen/config.guess index 187cd54edd2..e3a2116a7dc 100755 --- a/config.guess +++ b/autogen/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. -timestamp='2011-02-02' +timestamp='2009-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,16 +27,16 @@ timestamp='2011-02-02' # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,9 +56,8 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -181,7 +180,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -224,7 +223,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -270,10 +269,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; + exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -299,7 +295,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -337,9 +333,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" @@ -398,23 +391,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -484,8 +477,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -498,7 +491,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -555,7 +548,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[4567]) + *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -598,52 +591,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -734,22 +727,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -773,14 +766,14 @@ EOF exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -808,18 +801,18 @@ EOF echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - authenticamd | genuineintel | EM64T) + EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -861,20 +854,6 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -895,18 +874,7 @@ EOF echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -933,18 +901,39 @@ EOF #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -953,17 +942,14 @@ EOF *) echo hppa-unknown-linux-gnu ;; esac exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -971,9 +957,6 @@ EOF sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu - exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; @@ -981,8 +964,60 @@ EOF echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -990,11 +1025,11 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1026,7 +1061,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1054,13 +1089,13 @@ EOF exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1095,8 +1130,8 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1139,10 +1174,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1168,11 +1203,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1212,16 +1247,6 @@ EOF *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1237,9 +1262,6 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; @@ -1285,13 +1307,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1331,11 +1353,11 @@ main () #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif diff --git a/config.sub b/autogen/config.sub similarity index 93% rename from config.sub rename to autogen/config.sub index 0ef29b072ed..eb0389a693f 100755 --- a/config.sub +++ b/autogen/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. -timestamp='2011-02-24' +timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,16 +32,13 @@ timestamp='2011-02-24' # Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -75,9 +72,8 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -124,9 +120,8 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os @@ -154,12 +149,12 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; - -bluegene*) - os=-cnk + -bluegene*) + os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= @@ -175,10 +170,10 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -283,38 +278,26 @@ case $basic_machine in | moxie \ | mt \ | msp430 \ - | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ - | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ + | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) + m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -345,7 +328,7 @@ case $basic_machine in | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ @@ -357,7 +340,7 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -379,24 +362,21 @@ case $basic_machine in | mmix-* \ | mt-* \ | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ - | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ @@ -424,7 +404,7 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -494,20 +474,11 @@ case $basic_machine in basic_machine=powerpc-ibm os=-cnk ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; c90) basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -539,7 +510,7 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16 | cr16-*) + cr16) basic_machine=cr16-unknown os=-elf ;; @@ -755,9 +726,6 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) - basic_machine=microblaze-xilinx - ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -862,12 +830,6 @@ case $basic_machine in np1) basic_machine=np1-gould ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -1102,10 +1064,17 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff ;; tile*) basic_machine=tile-unknown @@ -1275,12 +1244,9 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1302,8 +1268,8 @@ case $os in # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1316,8 +1282,7 @@ case $os in | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1325,7 +1290,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1364,7 +1329,7 @@ case $os in -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1413,7 +1378,7 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1458,8 +1423,6 @@ case $os in -dicos*) os=-dicos ;; - -nacl*) - ;; -none) ;; *) @@ -1482,10 +1445,10 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1497,17 +1460,8 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1534,7 +1488,7 @@ case $basic_machine in m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1561,7 +1515,7 @@ case $basic_machine in *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) diff --git a/autogen/copy_autogen b/autogen/copy_autogen index 2096636c38b..a0daf9f02e5 100755 --- a/autogen/copy_autogen +++ b/autogen/copy_autogen @@ -16,6 +16,7 @@ if test ! -e config.in; then fi ## Order implied by top-level Makefile's rules, for time-stamps. +cp compile config.guess config.sub depcomp install-sh missing ../ cp aclocal.m4 ../ cp configure ../ touch ../src/stamp-h.in diff --git a/depcomp b/autogen/depcomp similarity index 100% rename from depcomp rename to autogen/depcomp diff --git a/install-sh b/autogen/install-sh similarity index 95% rename from install-sh rename to autogen/install-sh index a9244eb0786..6781b987bdb 100755 --- a/install-sh +++ b/autogen/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-01-19.21; # UTC +scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,10 +156,6 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 - # Protect names problematic for `test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac shift;; -T) no_target_directory=true;; @@ -190,10 +186,6 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg - # Protect names problematic for `test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac done fi @@ -208,11 +200,7 @@ if test $# -eq 0; then fi if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 + trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -240,9 +228,9 @@ fi for src do - # Protect names problematic for `test' and other utilities. + # Protect names starting with `-'. case $src in - -* | [=\(\)!]) src=./$src;; + -*) src=./$src;; esac if test -n "$dir_arg"; then @@ -264,7 +252,12 @@ do echo "$0: no destination specified." >&2 exit 1 fi + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -392,7 +385,7 @@ do case $dstdir in /*) prefix='/';; - [-=\(\)!]*) prefix='./';; + -*) prefix='./';; *) prefix='';; esac @@ -410,7 +403,7 @@ do for d do - test X"$d" = X && continue + test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then diff --git a/missing b/autogen/missing similarity index 100% rename from missing rename to autogen/missing diff --git a/autogen/update_autogen b/autogen/update_autogen index de525a9f4a2..795d5295939 100755 --- a/autogen/update_autogen +++ b/autogen/update_autogen @@ -68,7 +68,7 @@ quiet= ## Parameters. sources="configure.in lib/Makefile.am" -genfiles="configure aclocal.m4 src/config.in lib/Makefile.in" +genfiles="configure aclocal.m4 src/config.in lib/Makefile.in compile config.guess config.sub depcomp install-sh missing" for g in $genfiles; do basegen="$basegen ${g##*/}" @@ -126,7 +126,18 @@ done < $tempfile echo "Running autoreconf..." -autoreconf -I m4 || die "autoreconf error" +autoreconf -i -I m4 2>| $tempfile + +retval=$? + +## Annoyingly, autoreconf puts the "installing `./foo' messages on stderr. +if [ "$quiet" ]; then + grep -v 'installing `\.' $tempfile 1>&2 +else + cat "$tempfile" 1>&2 +fi + +[ $retval -ne 0 ] && die "autoreconf error" cp $genfiles autogen/ From 9257ee21a4d967beb92c754843b4d97b0a85a16b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 25 Mar 2011 00:17:23 -0700 Subject: [PATCH 109/166] * admin/make-tarball.txt: Comment. --- admin/make-tarball.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 9a556520070..1af20326543 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -29,7 +29,10 @@ For each step, check for possible errors. when preparing a major Emacs release, or branching for it.) 5. Edit configure.in so that maintainer-mode is off by default. - (FIXME - need to find a better way of dealing with this). + (FIXME - need to find a better way of dealing with this. + Or maybe it's fine and indeed correct to leave it on? + See http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00859.html + and subsequent.) autoreconf -i -I m4 --force make bootstrap From 07da4b3c924abe8cc95e88ce2f19daeebd8bba21 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 25 Mar 2011 14:10:45 +0200 Subject: [PATCH 110/166] Adapt config.bat and msdos/sedlibmk.inp to autogen and addition of stdio. msdos/sedlibmk.inp: Adapt to addition of the gnulib stdio module. config.bat: Generate src/config.h and lib/Makefile from autogen/config.in and autogen/Makefile.in. --- ChangeLog | 5 ++ config.bat | 5 +- msdos/ChangeLog | 4 ++ msdos/sedlibmk.inp | 152 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 164 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 71c445bbe0a..0a31e4015fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-03-25 Eli Zaretskii + + * config.bat: Generate src/config.h and lib/Makefile from + autogen/config.in and autogen/Makefile.in. + 2011-03-25 Glenn Morris * compile, config.guess, config.sub, depcomp, install-sh, missing: diff --git a/config.bat b/config.bat index 4288f6537e6..c90871de6ff 100644 --- a/config.bat +++ b/config.bat @@ -158,7 +158,7 @@ rem Create "config.h" rm -f config.h2 config.tmp sed -e '' config.in > config.tmp if "%X11%" == "" goto src4 -sed -f ../msdos/sed2x.inp config.tmp +sed -f ../msdos/sed2x.inp < ..\autogen\config.in > config.tmp :src4 sed -f ../msdos/sed2v2.inp config.h2 Rem See if DECL_ALIGN can be supported with this GCC @@ -283,11 +283,12 @@ If Exist getopt.in.h update getopt.in.h getopt.in-h If Exist stdbool.in.h update stdbool.in.h stdbool.in-h If Exist stddef.in.h update stddef.in.h stddef.in-h If Exist stdint.in.h update stdint.in.h stdint.in-h +If Exist stdio.in.h update stdio.in.h stdio.in-h If Exist stdlib.in.h update stdlib.in.h stdlib.in-h If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h If Exist time.in.h update time.in.h time.in-h If Exist unistd.in.h update unistd.in.h unistd.in-h -sed -f ../msdos/sedlibcf.inp < Makefile.in > makefile.tmp +sed -f ../msdos/sedlibcf.inp < ..\autogen\Makefile.in > makefile.tmp sed -f ../msdos/sedlibmk.inp < makefile.tmp > Makefile rm -f makefile.tmp Rem Create .Po files for new files in lib/ diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 1891d79da43..ce51a753741 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,3 +1,7 @@ +2011-03-25 Eli Zaretskii + + * sedlibmk.inp: Adapt to addition of the gnulib stdio module. + 2011-02-26 Eli Zaretskii * sedlibmk.inp (BITSIZEOF_PTRDIFF_T, BITSIZEOF_SIG_ATOMIC_T) diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index b71aef985a9..8a261400189 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -16,6 +16,69 @@ # # ---------------------------------------------------------------------- # +# Checklist to add a new gnulib module: +# +# . If the module includes source files that need to be compiled, add +# the corresponding .o file names to the list that gets assigned to +# the gl_LIBOBJS variable. +# +# . If the module defines functions that need to replace DJGPP +# functions, edit the appropriate REPLACE_foo variables to 1; +# otherwise edit them to zero: +# +# /^REPLACE_CALLOC *=/s/@REPLACE_CALLOC@/0/ +# +# . If it's a header, edit the corresponding variable to either an +# empty value or to the name of the header. Examples: +# +# /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ -- stdint.h is needed +# /^STDDEF_H *=/s/@[^@\n]*@// -- stddef.h is not needed +# +# . Also edit the NEXT_foo and NEXT_AS_FIRST_DIRECTIVE_foo_H variable +# as appropriately: to an empty value if the DJGPP system header +# should not be included after the gnulib one, or if the gnulib one +# is not needed; and to the corresponding DJGPP header name +# otherwise. Examples: +# +# /^NEXT_STDDEF_H *=/s/@[^@\n]*@// +# /^NEXT_STDINT_H *=/s/@[^@\n]*@// +# /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@// +# /^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// +# +# . If the header is needed, edit all the variables it uses as +# appropriate. In general, if DJGPP has the corresponding feature, +# the value of the corresponding HAVE_foo should be set to what +# DJGPP has, and the corresponding GNULIB_foo variable should be +# edited to zero. If the feature is not available, the HAVE_foo +# variable should be edited to zero and the corresponding +# GNULIB_foo variable should be edited to 1 if the gnulib +# replacement can work for DJGPP (a rare phenomenon), zero +# otherwise. +# +# . Some gnulib header files have more complex recipes in +# autogen/Makefile.in than others. The tell-tale sign of such a +# recipe is that the input redirection from the .in.h file is not +# present at the end of the command, like this: +# +# -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ +# } > $@-t && \ +# mv $@-t $@ +# +# as opposed to this: +# +# -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ +# < $(srcdir)/sys_stat.in.h; \ +# } > $@-t && \ +# mv $@-t $@ +# +# For those recipes that do _not_ have redirection at the end of +# the command, add a block of Sed commands like this: +# +# /^stdio\.h:/,/^ [ ]*mv /{ +# s/'\; \\ *$/' >> $@-t/ +# } +# +# ---------------------------------------------------------------------- # Replace @..@ constants. /^\# @configure_input@/s!@configure_input@!lib/Makefile. Generated from Makefile.in by config.bat! /^@SET_MAKE@$/s/@SET_MAKE@// @@ -64,6 +127,7 @@ am__cd = cd /^GNULIB_CANONICALIZE_FILE_NAME *=/s/@GNULIB_CANONICALIZE_FILE_NAME@/0/ /^GNULIB_CHOWN *=/s/@GNULIB_CHOWN@/0/ /^GNULIB_CLOSE *=/s/@GNULIB_CLOSE@/0/ +/^GNULIB_DPRINTF *=/s/@GNULIB_DPRINTF@/0/ /^GNULIB_DUP2 *=/s/@GNULIB_DUP2@/0/ /^GNULIB_DUP3 *=/s/@GNULIB_DUP3@/1/ /^GNULIB_ENVIRON *=/s/@GNULIB_ENVIRON@/0/ @@ -72,15 +136,31 @@ am__cd = cd /^GNULIB_FCHDIR *=/s/@GNULIB_FCHDIR@/0/ /^GNULIB_FCHOWNAT *=/s/@GNULIB_FCHOWNAT@/0/ /^GNULIB_FCHMODAT *=/s/@GNULIB_FCHMODAT@/0/ +/^GNULIB_FCLOSE *=/s/@GNULIB_FCLOSE@/0/ +/^GNULIB_FFLUSH *=/s/@GNULIB_FFLUSH@/0/ +/^GNULIB_FOPEN *=/s/@GNULIB_FOPEN@/0/ +/^GNULIB_FPRINTF *=/s/@GNULIB_FPRINTF@/0/ +/^GNULIB_FPRINTF_POSIX *=/s/@GNULIB_FPRINTF_POSIX@/0/ +/^GNULIB_FPURGE *=/s/@GNULIB_FPURGE@/0/ +/^GNULIB_FPUTC *=/s/@GNULIB_FPUTC@/0/ +/^GNULIB_FPUTS *=/s/@GNULIB_FPUTS@/0/ +/^GNULIB_FREOPEN *=/s/@GNULIB_FREOPEN@/0/ +/^GNULIB_FSEEK *=/s/@GNULIB_FSEEK@/0/ +/^GNULIB_FSEEKO *=/s/@GNULIB_FSEEKO@/0/ /^GNULIB_FSTATAT *=/s/@GNULIB_FSTATAT@/0/ /^GNULIB_FSYNC *=/s/@GNULIB_FSYNC@/0/ +/^GNULIB_FTELL *=/s/@GNULIB_FTELL@/0/ +/^GNULIB_FTELLO *=/s/@GNULIB_FTELLO@/0/ /^GNULIB_FTRUNCATE *=/s/@GNULIB_FTRUNCATE@/0/ /^GNULIB_FUTIMENS *=/s/@GNULIB_FUTIMENS@/0/ +/^GNULIB_FWRITE *=/s/@GNULIB_FWRITE@/0/ /^GNULIB_GETCWD *=/s/@GNULIB_GETCWD@/0/ +/^GNULIB_GETDELIM *=/s/@GNULIB_GETDELIM@/0/ /^GNULIB_GETDOMAINNAME *=/s/@GNULIB_GETDOMAINNAME@/0/ /^GNULIB_GETDTABLESIZE *=/s/@GNULIB_GETDTABLESIZE@/0/ /^GNULIB_GETGROUPS *=/s/@GNULIB_GETGROUPS@/0/ /^GNULIB_GETHOSTNAME *=/s/@GNULIB_GETHOSTNAME@/0/ +/^GNULIB_GETLINE *=/s/@GNULIB_GETLINE@/0/ /^GNULIB_GETLOADAVG *=/s/@GNULIB_GETLOADAVG@/1/ /^GNULIB_GETLOGIN *=/s/@GNULIB_GETLOGIN@/0/ /^GNULIB_GETLOGIN_R *=/s/@GNULIB_GETLOGIN_R@/0/ @@ -108,22 +188,35 @@ am__cd = cd /^GNULIB_MKSTEMPS *=/s/@GNULIB_MKSTEMPS@/0/ /^GNULIB_MKTIME *=/s/@GNULIB_MKTIME@/0/ /^GNULIB_NANOSLEEP *=/s/@GNULIB_NANOSLEEP@/0/ +/^GNULIB_OBSTACK_PRINTF *=/s/@GNULIB_OBSTACK_PRINTF@/0/ +/^GNULIB_OBSTACK_PRINTF_POSIX *=/s/@GNULIB_OBSTACK_PRINTF_POSIX@/0/ +/^GNULIB_PERROR *=/s/@GNULIB_PERROR@/0/ /^GNULIB_PIPE *=/s/@GNULIB_PIPE@/0/ /^GNULIB_PIPE2 *=/s/@GNULIB_PIPE2@/0/ +/^GNULIB_POPEN *=/s/@GNULIB_POPEN@/0/ /^GNULIB_PREAD *=/s/@GNULIB_PREAD@/0/ /^GNULIB_PTSNAME *=/s/@GNULIB_PTSNAME@/0/ +/^GNULIB_PUTC *=/s/@GNULIB_PUTC@/0/ +/^GNULIB_PUTCHAR *=/s/@GNULIB_PUTCHAR@/0/ /^GNULIB_PUTENV *=/s/@GNULIB_PUTENV@/0/ +/^GNULIB_PUTS *=/s/@GNULIB_PUTS@/0/ /^GNULIB_PWRITE *=/s/@GNULIB_PWRITE@/0/ /^GNULIB_RANDOM_R *=/s/@GNULIB_RANDOM_R@/0/ /^GNULIB_READLINK *=/s/@GNULIB_READLINK@/0/ /^GNULIB_READLINKAT *=/s/@GNULIB_READLINKAT@/0/ /^GNULIB_REALLOC_POSIX *=/s/@GNULIB_REALLOC_POSIX@/0/ /^GNULIB_REALPATH *=/s/@GNULIB_REALPATH@/0/ +/^GNULIB_REMOVE *=/s/@GNULIB_REMOVE@/0/ +/^GNULIB_RENAME *=/s/@GNULIB_RENAME@/0/ +/^GNULIB_RENAMEAT *=/s/@GNULIB_RENAMEAT@/0/ /^GNULIB_RMDIR *=/s/@GNULIB_RMDIR@/0/ /^GNULIB_RPMATCH *=/s/@GNULIB_RPMATCH@/0/ /^GNULIB_SETENV *=/s/@GNULIB_SETENV@/0/ /^GNULIB_SLEEP *=/s/@GNULIB_SLEEP@/0/ +/^GNULIB_SNPRINTF *=/s/@GNULIB_SNPRINTF@/0/ +/^GNULIB_SPRINTF_POSIX *=/s/@GNULIB_SPRINTF_POSIX@/0/ /^GNULIB_STAT *=/s/@GNULIB_STAT@/0/ +/^GNULIB_STDIO_H_SIGPIPE *=/s/@GNULIB_STDIO_H_SIGPIPE@/0/ /^GNULIB_STRPTIME *=/s/@GNULIB_STRPTIME@/0/ /^GNULIB_STRTOD *=/s/@GNULIB_STRTOD@/0/ /^GNULIB_STRTOLL *=/s/@GNULIB_STRTOLL@/0/ @@ -133,6 +226,7 @@ am__cd = cd /^GNULIB_SYSTEM_POSIX *=/s/@GNULIB_SYSTEM_POSIX@/0/ /^GNULIB_TIMEGM *=/s/@GNULIB_TIMEGM@/0/ /^GNULIB_TIME_R *=/s/@GNULIB_TIME_R@/1/ +/^GNULIB_TMPFILE *=/s/@GNULIB_TMPFILE@/0/ /^GNULIB_TTYNAME_R *=/s/@GNULIB_TTYNAME_R@/0/ /^GNULIB_UNISTD_H_GETOPT *=/s/@GNULIB_UNISTD_H_GETOPT@/1/ /^GNULIB_UNISTD_H_SIGPIPE *=/s/@GNULIB_UNISTD_H_SIGPIPE@/0/ @@ -142,6 +236,14 @@ am__cd = cd /^GNULIB_UNSETENV *=/s/@GNULIB_UNSETENV@/1/ /^GNULIB_USLEEP *=/s/@GNULIB_USLEEP@/0/ /^GNULIB_UTIMENSAT *=/s/@GNULIB_UTIMENSAT@/0/ +/^GNULIB_VASPRINTF *=/s/@GNULIB_VASPRINTF@/0/ +/^GNULIB_VDPRINTF *=/s/@GNULIB_VDPRINTF@/0/ +/^GNULIB_VFPRINTF *=/s/@GNULIB_VFPRINTF@/0/ +/^GNULIB_VFPRINTF_POSIX *=/s/@GNULIB_VFPRINTF_POSIX@/0/ +/^GNULIB_VPRINTF *=/s/@GNULIB_VPRINTF@/0/ +/^GNULIB_VPRINTF_POSIX *=/s/@GNULIB_VPRINTF_POSIX@/0/ +/^GNULIB_VSNPRINTF *=/s/@GNULIB_VSNPRINTF@/0/ +/^GNULIB_VSPRINTF_POSIX *=/s/@GNULIB_VSPRINTF_POSIX@/0/ /^GNULIB_WCTOMB *=/s/@GNULIB_WCTOMB@/0/ /^GNULIB_WRITE *=/s/@GNULIB_WRITE@/0/ /^GNULIB__EXIT *=/s/@GNULIB__EXIT@/0/ @@ -150,15 +252,24 @@ am__cd = cd /^HAVE_CHOWN *=/s/@HAVE_CHOWN@/1/ /^HAVE_DECL_ENVIRON *=/s/@HAVE_DECL_ENVIRON@/1/ /^HAVE_DECL_FCHDIR *=/s/@HAVE_DECL_FCHDIR@/0/ +/^HAVE_DECL_FPURGE *=/s/@HAVE_DECL_FPURGE@// +/^HAVE_DECL_FSEEKO *=/s/@HAVE_DECL_FSEEKO@/0/ +/^HAVE_DECL_FTELLO *=/s/@HAVE_DECL_FTELLO@/0/ +/^HAVE_DECL_GETDELIM *=/s/@HAVE_DECL_GETDELIM@/0/ /^HAVE_DECL_GETDOMAINNAME *=/s/@HAVE_DECL_GETDOMAINNAME@/0/ +/^HAVE_DECL_GETLINE *=/s/@HAVE_DECL_GETLINE@/0/ /^HAVE_DECL_GETLOADAVG *=/s/@HAVE_DECL_GETLOADAVG@/0/ /^HAVE_DECL_GETLOGIN_R *=/s/@HAVE_DECL_GETLOGIN_R@/0/ /^HAVE_DECL_GETPAGESIZE *=/s/@HAVE_DECL_GETPAGESIZE@/1/ /^HAVE_DECL_GETUSERSHELL *=/s/@HAVE_DECL_GETUSERSHELL@/0/ /^HAVE_DECL_LOCALTIME_R *=/s/@HAVE_DECL_LOCALTIME_R@/0/ +/^HAVE_DECL_OBSTACK_PRINTF *=/s/@HAVE_DECL_OBSTACK_PRINTF@/0/ /^HAVE_DECL_SETENV *=/s/@HAVE_DECL_SETENV@/1/ +/^HAVE_DECL_SNPRINTF *=/s/@HAVE_DECL_SNPRINTF@/0/ /^HAVE_DECL_TTYNAME_R *=/s/@HAVE_DECL_TTYNAME_R@/0/ /^HAVE_DECL_UNSETENV *=/s/@HAVE_DECL_UNSETENV@/0/ +/^HAVE_DECL_VSNPRINTF *=/s/@HAVE_DECL_VSNPRINTF@/0/ +/^HAVE_DPRINTF *=/s/@HAVE_DPRINTF@/0/ /^HAVE_DUP2 *=/s/@HAVE_DUP2@/1/ /^HAVE_DUP3 *=/s/@HAVE_DUP3@/0/ /^HAVE_EUIDACCESS *=/s/@HAVE_EUIDACCESS@/0/ @@ -166,8 +277,10 @@ am__cd = cd /^HAVE_FCHDIR *=/s/@HAVE_FCHDIR@/0/ /^HAVE_FCHMODAT *=/s/@HAVE_FCHMODAT@/0/ /^HAVE_FCHOWNAT *=/s/@HAVE_FCHOWNAT@/0/ +/^HAVE_FSEEKO *=/s/@HAVE_FSEEKO@/0/ /^HAVE_FSTATAT *=/s/@HAVE_FSTATAT@/0/ /^HAVE_FSYNC *=/s/@HAVE_FSYNC@/1/ +/^HAVE_FTELLO *=/s/@HAVE_FTELLO@/0/ /^HAVE_FTRUNCATE *=/s/@HAVE_FTRUNCATE@/1/ /^HAVE_FUTIMENS *=/s/@HAVE_FUTIMENS@/0/ /^HAVE_GETDTABLESIZE *=/s/@HAVE_GETDTABLESIZE@/0/ @@ -208,6 +321,7 @@ am__cd = cd /^HAVE_READLINK *=/s/@HAVE_READLINK@/0/ /^HAVE_READLINKAT *=/s/@HAVE_READLINKAT@/0/ /^HAVE_REALPATH *=/s/@HAVE_REALPATH@/0/ +/^HAVE_RENAMEAT *=/s/@HAVE_RENAMEAT@/0/ /^HAVE_RPMATCH *=/s/@HAVE_RPMATCH@/0/ /^HAVE_SETENV *=/s/@HAVE_SETENV@/1/ /^HAVE_SIGNED_SIG_ATOMIC_T *=/s/@HAVE_SIGNED_SIG_ATOMIC_T@/1/ @@ -234,6 +348,8 @@ am__cd = cd /^HAVE_UNSIGNED_LONG_LONG_INT *=/s/@HAVE_UNSIGNED_LONG_LONG_INT@/1/ /^HAVE_USLEEP *=/s/@HAVE_USLEEP@/1/ /^HAVE_UTIMENSAT *=/s/@HAVE_UTIMENSAT@/0/ +/^HAVE_VASPRINTF *=/s/@HAVE_VASPRINTF@/0/ +/^HAVE_VDPRINTF *=/s/@HAVE_VDPRINTF@/0/ /^HAVE_WCHAR_H *=/s/@HAVE_WCHAR_H@/1/ /^HAVE_WCHAR_T *=/s/@HAVE_WCHAR_T@/1/ /^HAVE_XSERVER *=/s/@HAVE_XSERVER@/0/ @@ -250,12 +366,14 @@ am__cd = cd /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDINT_H *=/s/@[^@\n]*@// +/^NEXT_AS_FIRST_DIRECTIVE_STDIO_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H *=/s!@[^@\n]*@!! /^NEXT_AS_FIRST_DIRECTIVE_TIME_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H *=/s/@[^@\n]*@// /^NEXT_GETOPT_H *=/s/@[^@\n]*@// /^NEXT_STDDEF_H *=/s/@[^@\n]*@// +/^NEXT_STDIO_H *=/s/@[^@\n]*@// /^NEXT_STDINT_H *=/s/@[^@\n]*@// /^NEXT_STDLIB_H *=/s/@[^@\n]*@// /^NEXT_SYS_STAT_H *=/s!@[^@\n]*@!! @@ -270,13 +388,27 @@ am__cd = cd /^REPLACE_CANONICALIZE_FILE_NAME *=/s/@REPLACE_CANONICALIZE_FILE_NAME@/0/ /^REPLACE_CHOWN *=/s/@REPLACE_CHOWN@/0/ /^REPLACE_CLOSE *=/s/@REPLACE_CLOSE@/0/ +/^REPLACE_DPRINTF *=/s/@REPLACE_DPRINTF@/0/ /^REPLACE_DUP *=/s/@REPLACE_DUP@/0/ /^REPLACE_DUP2 *=/s/@REPLACE_DUP2@/0/ /^REPLACE_FCHOWNAT *=/s/@REPLACE_FCHOWNAT@/0/ +/^REPLACE_FCLOSE *=/s/@REPLACE_FCLOSE@/0/ +/^REPLACE_FFLUSH *=/s/@REPLACE_FFLUSH@/0/ +/^REPLACE_FOPEN *=/s/@REPLACE_FOPEN@/0/ +/^REPLACE_FPRINTF *=/s/@REPLACE_FPRINTF@/0/ +/^REPLACE_FPURGE *=/s/@REPLACE_FPURGE@/0/ +/^REPLACE_FREOPEN *=/s/@REPLACE_FREOPEN@/0/ +/^REPLACE_FSEEK *=/s/@REPLACE_FSEEK@/0/ +/^REPLACE_FSEEKO *=/s/@REPLACE_FSEEKO@/0/ /^REPLACE_FSTAT *=/s/@REPLACE_FSTAT@/0/ +/^REPLACE_FSTATAT *=/s/@REPLACE_FSTATAT@/0/ +/^REPLACE_FTELL *=/s/@REPLACE_FTELL@/0/ +/^REPLACE_FTELLO *=/s/@REPLACE_FTELLO@/0/ /^REPLACE_GETCWD *=/s/@REPLACE_GETCWD@/0/ +/^REPLACE_GETDELIM *=/s/@REPLACE_GETDELIM@/0/ /^REPLACE_GETDOMAINNAME *=/s/@REPLACE_GETDOMAINNAME@/0/ /^REPLACE_GETGROUPS *=/s/@REPLACE_GETGROUPS@/0/ +/^REPLACE_GETLINE *=/s/@REPLACE_GETLINE@/0/ /^REPLACE_GETLOGIN_R *=/s/@REPLACE_GETLOGIN_R@/0/ /^REPLACE_GETPAGESIZE *=/s/@REPLACE_GETPAGESIZE@/0/ /^REPLACE_LCHOWN *=/s/@REPLACE_LCHOWN@/0/ @@ -294,25 +426,42 @@ am__cd = cd /^REPLACE_MKTIME *=/s/@REPLACE_MKTIME@/0/ /^REPLACE_NANOSLEEP *=/s/@REPLACE_NANOSLEEP@/0/ /^REPLACE_NULL *=/s/@REPLACE_NULL@/0/ +/^REPLACE_OBSTACK_PRINTF *=/s/@REPLACE_OBSTACK_PRINTF@/0/ +/^REPLACE_PERROR *=/s/@REPLACE_PERROR@/0/ +/^REPLACE_POPEN *=/s/@REPLACE_POPEN@/0/ /^REPLACE_PREAD *=/s/@REPLACE_PREAD@/0/ +/^REPLACE_PRINTF *=/s/@REPLACE_PRINTF@/0/ /^REPLACE_PUTENV *=/s/@REPLACE_PUTENV@/0/ /^REPLACE_PWRITE *=/s/@REPLACE_PWRITE@/0/ /^REPLACE_READLINK *=/s/@REPLACE_READLINK@/0/ /^REPLACE_REALLOC *=/s/@REPLACE_REALLOC@/0/ /^REPLACE_REALPATH *=/s/@REPLACE_REALPATH@/0/ +/^REPLACE_REMOVE *=/s/@REPLACE_REMOVE@/0/ +/^REPLACE_RENAME *=/s/@REPLACE_RENAME@/0/ +/^REPLACE_RENAMEAT *=/s/@REPLACE_RENAMEAT@/0/ /^REPLACE_RMDIR *=/s/@REPLACE_RMDIR@/0/ /^REPLACE_SETENV *=/s/@REPLACE_SETENV@/0/ /^REPLACE_SLEEP *=/s/@REPLACE_SLEEP@/0/ +/^REPLACE_SNPRINTF *=/s/@REPLACE_SNPRINTF@/0/ +/^REPLACE_SPRINTF *=/s/@REPLACE_SPRINTF@/0/ /^REPLACE_STAT *=/s/@REPLACE_STAT@/0/ +/^REPLACE_STDIO_WRITE_FUNCS *=/s/@REPLACE_STDIO_WRITE_FUNCS@/0/ /^REPLACE_STRTOD *=/s/@REPLACE_STRTOD@/0/ /^REPLACE_SYMLINK *=/s/@REPLACE_SYMLINK@/0/ /^REPLACE_TIMEGM *=/s/@REPLACE_TIMEGM@/0/ +/^REPLACE_TMPFILE *=/s/@REPLACE_TMPFILE@/0/ /^REPLACE_TTYNAME_R *=/s/@REPLACE_TTYNAME_R@/0/ /^REPLACE_UNLINK *=/s/@REPLACE_UNLINK@/0/ /^REPLACE_UNLINKAT *=/s/@REPLACE_UNLINKAT@/0/ /^REPLACE_UNSETENV *=/s/@REPLACE_UNSETENV@/0/ /^REPLACE_USLEEP *=/s/@REPLACE_USLEEP@/0/ /^REPLACE_UTIMENSAT *=/s/@REPLACE_UTIMENSAT@/0/ +/^REPLACE_VASPRINTF *=/s/@REPLACE_VASPRINTF@/0/ +/^REPLACE_VDPRINTF *=/s/@REPLACE_VDPRINTF@/0/ +/^REPLACE_VFPRINTF *=/s/@REPLACE_VFPRINTF@/0/ +/^REPLACE_VPRINTF *=/s/@REPLACE_VPRINTF@/0/ +/^REPLACE_VSNPRINTF *=/s/@REPLACE_VSNPRINTF@/0/ +/^REPLACE_VSPRINTF *=/s/@REPLACE_VSPRINTF@/0/ /^REPLACE_WCTOMB *=/s/@REPLACE_WCTOMB@/0/ /^REPLACE_WRITE *=/s/@REPLACE_WRITE@/0/ /^SIG_ATOMIC_T_SUFFIX *=/s/@SIG_ATOMIC_T_SUFFIX@// @@ -368,6 +517,9 @@ s/^ [ ]*{ echo \(.*\) && \\/ djecho \1 > $@-t/ s/ \&\& \\ *$// s/\.in-h\; *\\$/.in-h >> $@-t/ /^ [ ]*} /d +/^stdio\.h:/,/^ [ ]*mv /{ + s/'\; \\ *$/' >> $@-t/ +} /^stdlib\.h:/,/^ [ ]*mv /{ s/'\; \\ *$/' >> $@-t/ } From f4d87671c6291c761da032f79910f36c7033020a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 25 Mar 2011 14:52:03 +0200 Subject: [PATCH 111/166] Fix previous commit. config.bat: Use autogen/config.in in one more place. msdos/sedlibmk.inp (GNULIB_PRINTF, GNULIB_PRINTF_POSIX): Add missing variables. (MKDIR_P): Fix replacement command. (NEXT_AS_FIRST_DIRECTIVE_STDIO_H, NEXT_STDIO_H): Edit to "", as lib/stdio.h cannot be left unused. --- config.bat | 2 +- msdos/ChangeLog | 6 ++++++ msdos/sedlibmk.inp | 32 +++++++++++++++++++++++--------- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/config.bat b/config.bat index c90871de6ff..e480a4b9bc8 100644 --- a/config.bat +++ b/config.bat @@ -156,7 +156,7 @@ rm -f epaths.tmp rem Create "config.h" rm -f config.h2 config.tmp -sed -e '' config.in > config.tmp +sed -e '' ../autogen/config.in > config.tmp if "%X11%" == "" goto src4 sed -f ../msdos/sed2x.inp < ..\autogen\config.in > config.tmp :src4 diff --git a/msdos/ChangeLog b/msdos/ChangeLog index ce51a753741..f8215584f1e 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,6 +1,12 @@ 2011-03-25 Eli Zaretskii * sedlibmk.inp: Adapt to addition of the gnulib stdio module. + Add a description of what needs to be done when a new gnulib + module is added. + (GNULIB_PRINTF, GNULIB_PRINTF_POSIX): Add missing variables. + (MKDIR_P): Fix replacement command. + (NEXT_AS_FIRST_DIRECTIVE_STDIO_H, NEXT_STDIO_H): Edit to + "", as lib/stdio.h cannot be left unused. 2011-02-26 Eli Zaretskii diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index 8a261400189..d7af3681ef9 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -28,23 +28,28 @@ # # /^REPLACE_CALLOC *=/s/@REPLACE_CALLOC@/0/ # -# . If it's a header, edit the corresponding variable to either an -# empty value or to the name of the header. Examples: +# . If the module is a header or adds headers, edit the corresponding +# variable to either an empty value or to the name of the header. +# Examples: # # /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ -- stdint.h is needed # /^STDDEF_H *=/s/@[^@\n]*@// -- stddef.h is not needed # # . Also edit the NEXT_foo and NEXT_AS_FIRST_DIRECTIVE_foo_H variable -# as appropriately: to an empty value if the DJGPP system header -# should not be included after the gnulib one, or if the gnulib one -# is not needed; and to the corresponding DJGPP header name -# otherwise. Examples: +# as appropriately: to an empty value if the gnulib header is not +# used, and to the corresponding DJGPP header name otherwise. +# Examples: # # /^NEXT_STDDEF_H *=/s/@[^@\n]*@// # /^NEXT_STDINT_H *=/s/@[^@\n]*@// # /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@// # /^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// # +# . Note that some gnulib headers cannot be left unused: those for +# which there's no corresponding foo_H variable in +# autogen/Makefile.in (example: stdio.h). For these the "not +# needed" path is not applicable. +# # . If the header is needed, edit all the variables it uses as # appropriate. In general, if DJGPP has the corresponding feature, # the value of the corresponding HAVE_foo should be set to what @@ -78,6 +83,13 @@ # s/'\; \\ *$/' >> $@-t/ # } # +# The following Awk script is useful for editing portions of +# autogen/Makefile.in into Sed commands that define the corresponding +# variables to zero (which is what is required in the absolute +# majority of cases): +# +# { printf "/^%s *=/s/%s/0/\n",$1,$3} +# # ---------------------------------------------------------------------- # Replace @..@ constants. /^\# @configure_input@/s!@configure_input@!lib/Makefile. Generated from Makefile.in by config.bat! @@ -195,6 +207,8 @@ am__cd = cd /^GNULIB_PIPE2 *=/s/@GNULIB_PIPE2@/0/ /^GNULIB_POPEN *=/s/@GNULIB_POPEN@/0/ /^GNULIB_PREAD *=/s/@GNULIB_PREAD@/0/ +/^GNULIB_PRINTF *=/s/@GNULIB_PRINTF@/0/ +/^GNULIB_PRINTF_POSIX *=/s/@GNULIB_PRINTF_POSIX@/0/ /^GNULIB_PTSNAME *=/s/@GNULIB_PTSNAME@/0/ /^GNULIB_PUTC *=/s/@GNULIB_PUTC@/0/ /^GNULIB_PUTCHAR *=/s/@GNULIB_PUTCHAR@/0/ @@ -366,14 +380,14 @@ am__cd = cd /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDINT_H *=/s/@[^@\n]*@// -/^NEXT_AS_FIRST_DIRECTIVE_STDIO_H *=/s/@[^@\n]*@// +/^NEXT_AS_FIRST_DIRECTIVE_STDIO_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H *=/s!@[^@\n]*@!! /^NEXT_AS_FIRST_DIRECTIVE_TIME_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H *=/s/@[^@\n]*@// /^NEXT_GETOPT_H *=/s/@[^@\n]*@// /^NEXT_STDDEF_H *=/s/@[^@\n]*@// -/^NEXT_STDIO_H *=/s/@[^@\n]*@// +/^NEXT_STDIO_H *=/s/@[^@\n]*@// /^NEXT_STDINT_H *=/s/@[^@\n]*@// /^NEXT_STDLIB_H *=/s/@[^@\n]*@// /^NEXT_SYS_STAT_H *=/s!@[^@\n]*@!! @@ -526,4 +540,4 @@ s/\.in-h\; *\\$/.in-h >> $@-t/ /^unistd\.h:/,/^ [ ]*mv /{ s/'\; \\ *$/' >> $@-t/ } -s!\$(MKDIR_P)[ ][ ]*sys!command.com /c "if not exist sys\stat.h md sys"! +s!\$(MKDIR_P)[ ][ ]*sys!command.com /c "if not exist sys\\stat.h md sys"! From f9e771e246a981bb3d37c65beb89d18bb407e0cd Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 25 Mar 2011 15:06:41 +0100 Subject: [PATCH 112/166] .gitignore: Add compile, config.guess, config.sub, depcomp, install-sh, missing. --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index b2f17779d68..21702f7cd07 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,11 @@ configure aclocal.m4 +compile +config.guess +config.sub +depcomp +install-sh +missing lib/Makefile.in src/config.in autom4te.cache From 0f4a96b5d7de244a7be6fc98f6a66d3d1e6a7569 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 25 Mar 2011 16:39:59 +0100 Subject: [PATCH 113/166] nt/*.c, src/*.c: Remove unused variables. * nt/addpm.c (main): Remove unused variable `retval'. * nt/preprep.c (main): Remove unused variable `ptr'. * src/dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef. * src/fileio.c (check_executable) [DOS_NT]: Remove unused variables `len' and `suffix'. (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration of variables specific to SELinux and computation of `encoded_absname'. * src/image.c (XPutPixel): Remove unused variable `height'. * src/keyboard.c (make_lispy_event): Remove unused variable `hpos'. * src/unexw32.c (get_section_info): Remove unused variable `section'. * src/w32.c (stat): Remove unused variables `drive_root' and `devtype'. (system_process_attributes): Remove unused variable `sess'. (sys_read): Remove unused variable `err'. * src/w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef. (w32_wnd_proc): Remove unused variable `isdead'. (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef. (Fx_server_max_request_size): Remove unused variable `dpyinfo'. (x_create_tip_frame): Remove unused variable `tem'. * src/w32inevt.c (w32_console_read_socket): Remove unused variable `no_events'. * src/w32term.c (x_draw_composite_glyph_string_foreground): Remove unused variable `width'. --- nt/ChangeLog | 6 ++++++ nt/addpm.c | 4 ---- nt/preprep.c | 1 - src/ChangeLog | 33 ++++++++++++++++++++++++++++++++- src/dispextern.h | 2 +- src/fileio.c | 9 ++++----- src/image.c | 1 - src/keyboard.c | 1 - src/unexw32.c | 1 - src/w32.c | 4 ---- src/w32fns.c | 9 +++------ src/w32inevt.c | 1 - src/w32term.c | 1 - 13 files changed, 46 insertions(+), 27 deletions(-) diff --git a/nt/ChangeLog b/nt/ChangeLog index 657b4c7a10f..f041bac7360 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,9 @@ +2011-03-25 Juanma Barranquero + + * addpm.c (main): Remove unused variable `retval'. + + * preprep.c (main): Remove unused variable `ptr'. + 2011-03-23 Juanma Barranquero * cmdproxy.c: Include . diff --git a/nt/addpm.c b/nt/addpm.c index c2cd1a07abc..d7919d36f80 100644 --- a/nt/addpm.c +++ b/nt/addpm.c @@ -274,8 +274,6 @@ main (int argc, char *argv[]) { if (strlen (start_folder) < (MAX_PATH - 20)) { - BOOL retval; - strcat (start_folder, "\\Gnu Emacs"); if (CreateDirectory (start_folder, NULL) || GetLastError () == ERROR_ALREADY_EXISTS) @@ -307,8 +305,6 @@ main (int argc, char *argv[]) /* Ensure there is enough room for "...\GNU Emacs\Emacs.lnk". */ if (strlen (start_folder) < (MAX_PATH - 20)) { - BOOL retval; - strcat (start_folder, "\\Gnu Emacs"); if (CreateDirectory (start_folder, NULL) || GetLastError () == ERROR_ALREADY_EXISTS) diff --git a/nt/preprep.c b/nt/preprep.c index 513ad14e966..6b764afdeab 100644 --- a/nt/preprep.c +++ b/nt/preprep.c @@ -765,7 +765,6 @@ main (int argc, char **argv) PIMAGE_NT_HEADERS nt_header; file_data in_file, out_file; char out_filename[MAX_PATH], in_filename[MAX_PATH]; - const char *ptr; strcpy (in_filename, argv[1]); strcpy (out_filename, argv[2]); diff --git a/src/ChangeLog b/src/ChangeLog index ae40e4638fa..3dfc86a4778 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,34 @@ +2011-03-25 Juanma Barranquero + + * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef. + + * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len' + and `suffix'. + (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration + of variables specific to SELinux and computation of `encoded_absname'. + + * image.c (XPutPixel): Remove unused variable `height'. + + * keyboard.c (make_lispy_event): Remove unused variable `hpos'. + + * unexw32.c (get_section_info): Remove unused variable `section'. + + * w32.c (stat): Remove unused variables `drive_root' and `devtype'. + (system_process_attributes): Remove unused variable `sess'. + (sys_read): Remove unused variable `err'. + + * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef. + (w32_wnd_proc): Remove unused variable `isdead'. + (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef. + (Fx_server_max_request_size): Remove unused variable `dpyinfo'. + (x_create_tip_frame): Remove unused variable `tem'. + + * w32inevt.c (w32_console_read_socket): + Remove unused variable `no_events'. + + * w32term.c (x_draw_composite_glyph_string_foreground): + Remove unused variable `width'. + 2011-03-24 Juanma Barranquero * w32term.c (x_set_glyph_string_clipping): @@ -40,7 +71,7 @@ * buffer.c (Fkill_all_local_variables): * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1): Use Frun_hooks. - (command_loop_1): Use Frun_hooks. Call safe_run_hooks + (command_loop_1): Use Frun_hooks. Call safe_run_hooks unconditionnaly since it does the check itself. 2011-03-23 Paul Eggert diff --git a/src/dispextern.h b/src/dispextern.h index 9843dfd1fcd..d1e0475dd15 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -662,7 +662,7 @@ struct glyph_matrix line. */ unsigned header_line_p : 1; -#ifdef GLYPH_DEBUG +#if GLYPH_DEBUG /* A string identifying the method used to display the matrix. */ char method[512]; #endif diff --git a/src/fileio.c b/src/fileio.c index 64dda0a78e4..bab9360d3bc 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2359,8 +2359,6 @@ static int check_executable (char *filename) { #ifdef DOS_NT - int len = strlen (filename); - char *suffix; struct stat st; if (stat (filename, &st) < 0) return 0; @@ -2786,13 +2784,14 @@ as a list ("user", "role", "type", "range"). Has no effect if SELinux is disabled. */) (Lisp_Object filename, Lisp_Object context) { - Lisp_Object absname, encoded_absname; + Lisp_Object absname; Lisp_Object handler; +#if HAVE_LIBSELINUX + Lisp_Object encoded_absname; Lisp_Object user = CAR_SAFE (context); Lisp_Object role = CAR_SAFE (CDR_SAFE (context)); Lisp_Object type = CAR_SAFE (CDR_SAFE (CDR_SAFE (context))); Lisp_Object range = CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (context)))); -#if HAVE_LIBSELINUX security_context_t con; int fail, conlength; context_t parsed_con; @@ -2806,9 +2805,9 @@ is disabled. */) if (!NILP (handler)) return call3 (handler, Qset_file_selinux_context, absname, context); +#if HAVE_LIBSELINUX encoded_absname = ENCODE_FILE (absname); -#if HAVE_LIBSELINUX if (is_selinux_enabled ()) { /* Get current file context. */ diff --git a/src/image.c b/src/image.c index 7584f9bb2c0..04c6b1a2ad5 100644 --- a/src/image.c +++ b/src/image.c @@ -4485,7 +4485,6 @@ static void XPutPixel (XImagePtr ximg, int x, int y, COLORREF color) { int width = ximg->info.bmiHeader.biWidth; - int height = ximg->info.bmiHeader.biHeight; unsigned char * pixel; /* True color images. */ diff --git a/src/keyboard.c b/src/keyboard.c index 39848ee490d..6ce102c7d65 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -5399,7 +5399,6 @@ make_lispy_event (struct input_event *event) && (event->modifiers & down_modifier)) { Lisp_Object items, item; - int hpos; int i; /* Find the menu bar item under `column'. */ diff --git a/src/unexw32.c b/src/unexw32.c index cd8211d6bee..e03fa6c9b9a 100644 --- a/src/unexw32.c +++ b/src/unexw32.c @@ -341,7 +341,6 @@ get_section_info (file_data *p_infile) { PIMAGE_DOS_HEADER dos_header; PIMAGE_NT_HEADERS nt_header; - PIMAGE_SECTION_HEADER section; int overlap; dos_header = (PIMAGE_DOS_HEADER) p_infile->file_base; diff --git a/src/w32.c b/src/w32.c index 721cea07d20..bbf777b2e1d 100644 --- a/src/w32.c +++ b/src/w32.c @@ -3250,8 +3250,6 @@ int stat (const char * path, struct stat * buf) { char *name, *r; - char drive_root[4]; - UINT devtype; WIN32_FIND_DATA wfd; HANDLE fh; unsigned __int64 fake_inode; @@ -4043,7 +4041,6 @@ system_process_attributes (Lisp_Object pid) TOKEN_PRIMARY_GROUP group_token; unsigned euid; unsigned egid; - DWORD sess; PROCESS_MEMORY_COUNTERS mem; PROCESS_MEMORY_COUNTERS_EX mem_ex; DWORD minrss, maxrss; @@ -5408,7 +5405,6 @@ sys_read (int fd, char * buffer, unsigned int count) { HANDLE hnd = fd_info[fd].hnd; OVERLAPPED *ovl = &fd_info[fd].cp->ovl_read; - DWORD err = 0; int rc = 0; COMMTIMEOUTS ct; diff --git a/src/w32fns.c b/src/w32fns.c index d833f9d550f..821cc671646 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -183,7 +183,7 @@ unsigned int msh_mousewheel = 0; #define MENU_FREE_DELAY 1000 static unsigned menu_free_timer = 0; -#ifdef GLYPH_DEBUG +#if GLYPH_DEBUG int image_cache_refcount, dpyinfo_refcount; #endif @@ -2862,7 +2862,6 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) base character (ie. translating the base key plus shift modifier). */ int add; - int isdead = 0; KEY_EVENT_RECORD key; key.bKeyDown = TRUE; @@ -3980,7 +3979,7 @@ unwind_create_frame (Lisp_Object frame) /* If frame is ``official'', nothing to do. */ if (!CONSP (Vframe_list) || !EQ (XCAR (Vframe_list), frame)) { -#ifdef GLYPH_DEBUG +#if GLYPH_DEBUG struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); #endif @@ -4521,8 +4520,6 @@ DISPLAY should be either a frame or a display name (a string). If omitted or nil, that stands for the selected frame's display. */) (Lisp_Object display) { - struct w32_display_info *dpyinfo = check_x_display_info (display); - return make_number (1); } @@ -5171,7 +5168,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, Lisp_Object parms, Lisp_Object text) { struct frame *f; - Lisp_Object frame, tem; + Lisp_Object frame; Lisp_Object name; long window_prompting = 0; int width, height; diff --git a/src/w32inevt.c b/src/w32inevt.c index c4858dea908..465f5ccb70f 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c @@ -677,7 +677,6 @@ w32_console_read_socket (struct terminal *terminal, int expected, struct input_event *hold_quit) { - BOOL no_events = TRUE; int nev, ret = 0, add; int isdead; diff --git a/src/w32term.c b/src/w32term.c index 2252c930711..f6a6ba3e82f 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1289,7 +1289,6 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s) else if (! s->first_glyph->u.cmp.automatic) { int y = s->ybase; - int width = 0; HFONT old_font; old_font = SelectObject (s->hdc, FONT_HANDLE (font)); From a9b53ad3778a9d61fdf66681e33d2dc75f7bd8f3 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 25 Mar 2011 18:37:15 +0100 Subject: [PATCH 114/166] src/fileio.c: Move computation of encoded_absname inside `if'. --- src/fileio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index bab9360d3bc..85431dfd5b1 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2806,11 +2806,10 @@ is disabled. */) return call3 (handler, Qset_file_selinux_context, absname, context); #if HAVE_LIBSELINUX - encoded_absname = ENCODE_FILE (absname); - if (is_selinux_enabled ()) { /* Get current file context. */ + encoded_absname = ENCODE_FILE (absname); conlength = lgetfilecon (SSDATA (encoded_absname), &con); if (conlength > 0) { From 6b1f9ba4770e8f488c378cfa87dc868cad62c436 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 25 Mar 2011 19:06:33 +0100 Subject: [PATCH 115/166] src/*.c: Remove unused function parameters. * buffer.c (defvar_per_buffer): Remove unused parameter `doc'. (DEFVAR_PER_BUFFER): Don't pass it. * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'. (scrolling_window): Don't pass it. --- src/ChangeLog | 8 ++++++++ src/buffer.c | 4 ++-- src/dispnew.c | 24 ++++++++++-------------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3dfc86a4778..bd06cd1869e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2011-03-25 Juanma Barranquero + + * buffer.c (defvar_per_buffer): Remove unused parameter `doc'. + (DEFVAR_PER_BUFFER): Don't pass it. + + * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'. + (scrolling_window): Don't pass it. + 2011-03-25 Juanma Barranquero * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef. diff --git a/src/buffer.c b/src/buffer.c index da2cc1573c8..8b56b285e48 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5224,12 +5224,12 @@ init_buffer (void) #define DEFVAR_PER_BUFFER(lname, vname, type, doc) \ do { \ static struct Lisp_Buffer_Objfwd bo_fwd; \ - defvar_per_buffer (&bo_fwd, lname, vname, type, 0); \ + defvar_per_buffer (&bo_fwd, lname, vname, type); \ } while (0) static void defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring, - Lisp_Object *address, Lisp_Object type, char *doc) + Lisp_Object *address, Lisp_Object type) { struct Lisp_Symbol *sym; int offset; diff --git a/src/dispnew.c b/src/dispnew.c index 1408bea2fc6..093ed9524e4 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1297,13 +1297,11 @@ line_draw_cost (struct glyph_matrix *matrix, int vpos) /* Test two glyph rows A and B for equality. Value is non-zero if A - and B have equal contents. W is the window to which the glyphs - rows A and B belong. It is needed here to test for partial row - visibility. MOUSE_FACE_P non-zero means compare the mouse_face_p - flags of A and B, too. */ + and B have equal contents. MOUSE_FACE_P non-zero means compare the + mouse_face_p flags of A and B, too. */ static INLINE int -row_equal_p (struct window *w, struct glyph_row *a, struct glyph_row *b, int mouse_face_p) +row_equal_p (struct glyph_row *a, struct glyph_row *b, int mouse_face_p) { if (a == b) return 1; @@ -4251,17 +4249,16 @@ static int runs_size; static struct run **runs; -/* Add glyph row ROW to the scrolling hash table during the scrolling - of window W. */ +/* Add glyph row ROW to the scrolling hash table. */ static INLINE struct row_entry * -add_row_entry (struct window *w, struct glyph_row *row) +add_row_entry (struct glyph_row *row) { struct row_entry *entry; int i = row->hash % row_table_size; entry = row_table[i]; - while (entry && !row_equal_p (w, entry->row, row, 1)) + while (entry && !row_equal_p (entry->row, row, 1)) entry = entry->next; if (entry == NULL) @@ -4328,7 +4325,7 @@ scrolling_window (struct window *w, int header_line_p) && c->y == d->y && MATRIX_ROW_BOTTOM_Y (c) <= yb && MATRIX_ROW_BOTTOM_Y (d) <= yb - && row_equal_p (w, c, d, 1)) + && row_equal_p (c, d, 1)) { assign_row (c, d); d->enabled_p = 0; @@ -4381,8 +4378,7 @@ scrolling_window (struct window *w, int header_line_p) && (MATRIX_ROW (current_matrix, i - 1)->y == MATRIX_ROW (desired_matrix, j - 1)->y) && !MATRIX_ROW (desired_matrix, j - 1)->redraw_fringe_bitmaps_p - && row_equal_p (w, - MATRIX_ROW (desired_matrix, i - 1), + && row_equal_p (MATRIX_ROW (desired_matrix, i - 1), MATRIX_ROW (current_matrix, j - 1), 1)) --i, --j; last_new = i; @@ -4443,7 +4439,7 @@ scrolling_window (struct window *w, int header_line_p) { if (MATRIX_ROW (current_matrix, i)->enabled_p) { - entry = add_row_entry (w, MATRIX_ROW (current_matrix, i)); + entry = add_row_entry (MATRIX_ROW (current_matrix, i)); old_lines[i] = entry; ++entry->old_uses; } @@ -4454,7 +4450,7 @@ scrolling_window (struct window *w, int header_line_p) for (i = first_new; i < last_new; ++i) { xassert (MATRIX_ROW_ENABLED_P (desired_matrix, i)); - entry = add_row_entry (w, MATRIX_ROW (desired_matrix, i)); + entry = add_row_entry (MATRIX_ROW (desired_matrix, i)); ++entry->new_uses; entry->new_line_number = i; new_lines[i] = entry; From 9ee0d174617ef235d5ec8d8d2393bfdce0a04d15 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 25 Mar 2011 19:16:41 +0100 Subject: [PATCH 116/166] * autogen/update_autogen: Remove useless function keyword. --- ChangeLog | 4 ++++ autogen/update_autogen | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a31e4015fc..d962373a4d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-03-25 Andreas Schwab + + * autogen/update_autogen: Remove useless function keyword. + 2011-03-25 Eli Zaretskii * config.bat: Generate src/config.h and lib/Makefile from diff --git a/autogen/update_autogen b/autogen/update_autogen index 795d5295939..d8b451c370b 100755 --- a/autogen/update_autogen +++ b/autogen/update_autogen @@ -28,7 +28,7 @@ ### Code: -function die () # write error to stderr and exit +die () # write error to stderr and exit { [ $# -gt 0 ] && echo "$PN: $@" >&2 exit 1 @@ -45,7 +45,7 @@ cd ../ [ -d autogen ] || die "Could not locate autogen directory" -function usage () +usage () { cat 1>&2 < Date: Fri, 25 Mar 2011 16:00:25 -0400 Subject: [PATCH 117/166] Discard changes to buffer->clip_changed incurred during fontification. * src/xdisp.c (handle_fontified_prop): Discard changes to clip_changed incurred during fontification. --- src/ChangeLog | 5 +++++ src/xdisp.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index bd06cd1869e..c7b0edede3f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-25 Chong Yidong + + * xdisp.c (handle_fontified_prop): Discard changes to clip_changed + incurred during fontification. + 2011-03-25 Juanma Barranquero * buffer.c (defvar_per_buffer): Remove unused parameter `doc'. diff --git a/src/xdisp.c b/src/xdisp.c index 457a5e3e11b..cc5d61abdb2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3164,6 +3164,9 @@ handle_fontified_prop (struct it *it) { int count = SPECPDL_INDEX (); Lisp_Object val; + struct buffer *obuf = current_buffer; + int begv = BEGV, zv = ZV; + int old_clip_changed = current_buffer->clip_changed; val = Vfontification_functions; specbind (Qfontification_functions, Qnil); @@ -3209,6 +3212,23 @@ handle_fontified_prop (struct it *it) unbind_to (count, Qnil); + /* Fontification functions routinely call `save-restriction'. + Normally, this tags clip_changed, which can confuse redisplay + (see discussion in Bug#6671). Since we don't perform any + special handling of fontification changes in the case where + `save-restriction' isn't called, there's no point doing so in + this case either. So, if the buffer's restrictions are + actually left unchanged, reset clip_changed. */ + if (obuf == current_buffer) + { + if (begv == BEGV && zv == ZV) + current_buffer->clip_changed = old_clip_changed; + } + /* There isn't much we can reasonably do to protect against + misbehaving fontification, but here's a fig leaf. */ + else if (!NILP (BVAR (obuf, name))) + set_buffer_internal_1 (obuf); + /* The fontification code may have added/removed text. It could do even a lot worse, but let's at least protect against the most obvious case where only the text past `pos' gets changed', From 1f48f7d236dcf7ec26f0f8317cd26a3475126cb8 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sat, 26 Mar 2011 06:11:15 +0800 Subject: [PATCH 118/166] Remove unused and erroneous midnight-time-float --- lisp/ChangeLog | 4 ++++ lisp/midnight.el | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f07ac0953ff..1be233c84b8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2011-03-25 Leo Liu + * midnight.el (midnight-time-float): Remove. Note it calculates + the microsecond component incorrectly and seconds-to-time does the + same job. + * ido.el (ido-read-internal): Simplify with read-from-minibuffer. (ido-completions): Remove unused arguments. (Bug#8329) diff --git a/lisp/midnight.el b/lisp/midnight.el index 9a6b162e986..db8f6c5a3df 100644 --- a/lisp/midnight.el +++ b/lisp/midnight.el @@ -66,12 +66,6 @@ call `cancel-timer' or `timer-activate' on `midnight-timer' instead." ;;; time conversion -(defun midnight-time-float (num) - "Convert the float number of seconds since epoch to the list of 3 integers." - (let* ((div (ash 1 16)) (1st (floor num div))) - (list 1st (floor (- num (* (float div) 1st))) - (round (* 10000000 (mod num 1)))))) - (defun midnight-buffer-display-time (&optional buffer) "Return the time-stamp of BUFFER, or current buffer, as float." (with-current-buffer (or buffer (current-buffer)) From 625897eca3cd4a948791e721b90a2ab31b8e8d8e Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sat, 26 Mar 2011 06:26:30 +0800 Subject: [PATCH 119/166] Remove redundant (require 'timer) in midnight.el --- lisp/ChangeLog | 1 + lisp/midnight.el | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1be233c84b8..f1b53619268 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,7 @@ * midnight.el (midnight-time-float): Remove. Note it calculates the microsecond component incorrectly and seconds-to-time does the same job. + Remove redundant (require 'timer). * ido.el (ido-read-internal): Simplify with read-from-minibuffer. (ido-completions): Remove unused arguments. (Bug#8329) diff --git a/lisp/midnight.el b/lisp/midnight.el index db8f6c5a3df..762bc5445ba 100644 --- a/lisp/midnight.el +++ b/lisp/midnight.el @@ -39,8 +39,6 @@ (eval-when-compile (require 'cl)) -(require 'timer) - (defgroup midnight nil "Run something every day at midnight." :group 'calendar From dc8026879ec33cfdcb47973ab7a3c14789c62aa6 Mon Sep 17 00:00:00 2001 From: Teodor Zlatanov Date: Fri, 25 Mar 2011 23:27:18 +0000 Subject: [PATCH 120/166] mm-util.el (mm-handle-filename): Move to mm-decode.el (bug#8330). mm-decode.el (mm-handle-filename): Move from mm-util.el (bug#8330). --- lisp/gnus/ChangeLog | 6 ++++++ lisp/gnus/mm-decode.el | 7 +++++++ lisp/gnus/mm-util.el | 7 ------- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d728d1957b1..ddc946383b6 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2011-03-25 Teodor Zlatanov + + * mm-util.el (mm-handle-filename): Move to mm-decode.el (bug#8330). + + * mm-decode.el (mm-handle-filename): Move from mm-util.el (bug#8330). + 2011-03-21 Julien Danjou * mm-view.el (mm-display-inline-fontify): Make mode optional, and call diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 3909e12186f..f543920446b 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1744,6 +1744,13 @@ If RECURSIVE, search recursively." (delete-region ,(point-min-marker) ,(point-max-marker)))))))) +(defun mm-handle-filename (handle) + "Return filename of HANDLE if any." + (or (mail-content-type-get (mm-handle-type handle) + 'name) + (mail-content-type-get (mm-handle-disposition handle) + 'filename))) + (provide 'mm-decode) ;;; mm-decode.el ends here diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index d53784e8cc4..435c3bba00f 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -1667,13 +1667,6 @@ gzip, bzip2, etc. are allowed." (when decomp (kill-buffer (current-buffer))))))) -(defun mm-handle-filename (handle) - "Return filename of HANDLE if any." - (or (mail-content-type-get (mm-handle-type handle) - 'name) - (mail-content-type-get (mm-handle-disposition handle) - 'filename))) - (provide 'mm-util) ;;; mm-util.el ends here From f868cd8a7186e86e4c9bbd52de2aca99fa94648f Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 26 Mar 2011 02:23:15 +0100 Subject: [PATCH 121/166] src/*.h: Remove unused parameters and functions. * keyboard.h (timer_check, show_help_echo): Remove unused parameters. * keyboard.c (timer_check): Remove parameter `do_it_now', unused since 1996-04-12T06:01:29Z!rms@gnu.org. (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo', unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca. * keyboard.c (read_char): * w32menu.c (w32_menu_display_help): * xmenu.c (show_help_event, menu_help_callback): Adjust calls to `show_help_echo'. * gtkutil.c (xg_maybe_add_timer): * keyboard.c (readable_events): * process.c (wait_reading_process_output): * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'. * insdel.c (adjust_markers_gap_motion): Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org. (gap_left, gap_right): Don't call it. --- src/ChangeLog | 23 ++++++++++++++++ src/gtkutil.c | 2 +- src/insdel.c | 72 +++----------------------------------------------- src/keyboard.c | 20 +++++--------- src/keyboard.h | 4 +-- src/process.c | 4 +-- src/w32menu.c | 2 +- src/xmenu.c | 6 ++--- 8 files changed, 41 insertions(+), 92 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c7b0edede3f..69e850610bc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,26 @@ +2011-03-26 Juanma Barranquero + + * keyboard.h (timer_check, show_help_echo): Remove unused parameters. + + * keyboard.c (timer_check): Remove parameter `do_it_now', + unused since 1996-04-12T06:01:29Z!rms@gnu.org. + (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo', + unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca. + + * keyboard.c (read_char): + * w32menu.c (w32_menu_display_help): + * xmenu.c (show_help_event, menu_help_callback): + Adjust calls to `show_help_echo'. + + * gtkutil.c (xg_maybe_add_timer): + * keyboard.c (readable_events): + * process.c (wait_reading_process_output): + * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'. + + * insdel.c (adjust_markers_gap_motion): + Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org. + (gap_left, gap_right): Don't call it. + 2011-03-25 Chong Yidong * xdisp.c (handle_fontified_prop): Discard changes to clip_changed diff --git a/src/gtkutil.c b/src/gtkutil.c index 754f61e366d..4e5ecce76c7 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1555,7 +1555,7 @@ static gboolean xg_maybe_add_timer (gpointer data) { struct xg_dialog_data *dd = (struct xg_dialog_data *) data; - EMACS_TIME next_time = timer_check (1); + EMACS_TIME next_time = timer_check (); long secs = EMACS_SECS (next_time); long usecs = EMACS_USECS (next_time); diff --git a/src/insdel.c b/src/insdel.c index 1cbe3de20d2..4bdcb4bc0b7 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -41,8 +41,6 @@ static void insert_from_buffer_1 (struct buffer *buf, int inherit); static void gap_left (EMACS_INT charpos, EMACS_INT bytepos, int newgap); static void gap_right (EMACS_INT charpos, EMACS_INT bytepos); -static void adjust_markers_gap_motion (EMACS_INT from, EMACS_INT to, - EMACS_INT amount); static void adjust_markers_for_insert (EMACS_INT from, EMACS_INT from_byte, EMACS_INT to, EMACS_INT to_byte, int before_markers); @@ -162,10 +160,9 @@ gap_left (EMACS_INT charpos, EMACS_INT bytepos, int newgap) memmove (to, from, i); } - /* Adjust markers, and buffer data structure, to put the gap at BYTEPOS. - BYTEPOS is where the loop above stopped, which may be what was specified - or may be where a quit was detected. */ - adjust_markers_gap_motion (bytepos, GPT_BYTE, GAP_SIZE); + /* Adjust buffer data structure, to put the gap at BYTEPOS. + BYTEPOS is where the loop above stopped, which may be what + was specified or may be where a quit was detected. */ GPT_BYTE = bytepos; GPT = charpos; if (bytepos < charpos) @@ -217,8 +214,6 @@ gap_right (EMACS_INT charpos, EMACS_INT bytepos) from += i, to += i; } - adjust_markers_gap_motion (GPT_BYTE + GAP_SIZE, bytepos + GAP_SIZE, - - GAP_SIZE); GPT = charpos; GPT_BYTE = bytepos; if (bytepos < charpos) @@ -227,67 +222,6 @@ gap_right (EMACS_INT charpos, EMACS_INT bytepos) QUIT; } -/* Add AMOUNT to the byte position of every marker in the current buffer - whose current byte position is between FROM (exclusive) and TO (inclusive). - - Also, any markers past the outside of that interval, in the direction - of adjustment, are first moved back to the near end of the interval - and then adjusted by AMOUNT. - - When the latter adjustment is done, if AMOUNT is negative, - we record the adjustment for undo. (This case happens only for - deletion.) - - The markers' character positions are not altered, - because gap motion does not affect character positions. */ - -int adjust_markers_test; - -static void -adjust_markers_gap_motion (EMACS_INT from, EMACS_INT to, EMACS_INT amount) -{ - /* Now that a marker has a bytepos, not counting the gap, - nothing needs to be done here. */ -#if 0 - Lisp_Object marker; - register struct Lisp_Marker *m; - register EMACS_INT mpos; - - marker = BUF_MARKERS (current_buffer); - - while (!NILP (marker)) - { - m = XMARKER (marker); - mpos = m->bytepos; - if (amount > 0) - { - if (mpos > to && mpos < to + amount) - { - if (adjust_markers_test) - abort (); - mpos = to + amount; - } - } - else - { - /* Here's the case where a marker is inside text being deleted. - AMOUNT can be negative for gap motion, too, - but then this range contains no markers. */ - if (mpos > from + amount && mpos <= from) - { - if (adjust_markers_test) - abort (); - mpos = from + amount; - } - } - if (mpos > from && mpos <= to) - mpos += amount; - m->bufpos = mpos; - marker = m->chain; - } -#endif -} - /* Adjust all markers for a deletion whose range in bytes is FROM_BYTE to TO_BYTE. The range in charpos is FROM to TO. diff --git a/src/keyboard.c b/src/keyboard.c index 6ce102c7d65..c4ef2795f6a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -351,7 +351,7 @@ Lisp_Object Qmenu_bar; Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void); Lisp_Object Fthis_command_keys (void); Lisp_Object Qextended_command_history; -EMACS_TIME timer_check (int do_it_now); +EMACS_TIME timer_check (void); static void record_menu_key (Lisp_Object c); static int echo_length (void); @@ -2068,16 +2068,12 @@ make_ctrl_char (int c) the `display' property). POS is the position in that string under the mouse. - OK_TO_OVERWRITE_KEYSTROKE_ECHO non-zero means it's okay if the help - echo overwrites a keystroke echo currently displayed in the echo - area. - Note: this function may only be called with HELP nil or a string from X code running asynchronously. */ void show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object, - Lisp_Object pos, int ok_to_overwrite_keystroke_echo) + Lisp_Object pos) { if (!NILP (help) && !STRINGP (help)) { @@ -3007,7 +3003,7 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event htem = Fcdr (htem); position = Fcar (htem); - show_help_echo (help, window, object, position, 0); + show_help_echo (help, window, object, position); /* We stopped being idle for this event; undo that. */ if (!end_time) @@ -3309,7 +3305,7 @@ static int readable_events (int flags) { if (flags & READABLE_EVENTS_DO_TIMERS_NOW) - timer_check (1); + timer_check (); /* If the buffer contains only FOCUS_IN_EVENT events, and READABLE_EVENTS_FILTER_EVENTS is set, report it as empty. */ @@ -4383,14 +4379,10 @@ timer_check_2 (void) Returns the time to wait until the next timer fires. If no timer is active, return -1. - As long as any timer is ripe, we run it. - - DO_IT_NOW is now ignored. It used to mean that we should - run the timer directly instead of queueing a timer-event. - Now we always run timers directly. */ + As long as any timer is ripe, we run it. */ EMACS_TIME -timer_check (int do_it_now) +timer_check (void) { EMACS_TIME nexttime; diff --git a/src/keyboard.h b/src/keyboard.h index 00745a09140..ba3c909c4dd 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -507,7 +507,7 @@ extern void kbd_buffer_store_event_hold (struct input_event *, extern void kbd_buffer_unget_event (struct input_event *); extern void poll_for_input_1 (void); extern void show_help_echo (Lisp_Object, Lisp_Object, Lisp_Object, - Lisp_Object, int); + Lisp_Object); extern void gen_help_event (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, EMACS_INT); extern void kbd_buffer_store_help_event (Lisp_Object, Lisp_Object); @@ -517,7 +517,7 @@ extern void add_user_signal (int, const char *); extern int tty_read_avail_input (struct terminal *, int, struct input_event *); -extern EMACS_TIME timer_check (int); +extern EMACS_TIME timer_check (void); extern void mark_kboards (void); #ifdef WINDOWSNT diff --git a/src/process.c b/src/process.c index 4a7202388bf..639b6a49fce 100644 --- a/src/process.c +++ b/src/process.c @@ -4548,7 +4548,7 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, struct buffer *old_buffer = current_buffer; Lisp_Object old_window = selected_window; - timer_delay = timer_check (1); + timer_delay = timer_check (); /* If a timer has run, this might have changed buffers an alike. Make read_key_sequence aware of that. */ @@ -6946,7 +6946,7 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, do { int old_timers_run = timers_run; - timer_delay = timer_check (1); + timer_delay = timer_check (); if (timers_run != old_timers_run && do_display) /* We must retry, since a timer may have requeued itself and that could alter the time delay. */ diff --git a/src/w32menu.c b/src/w32menu.c index c363fdd72cb..f092ff87bf2 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1616,7 +1616,7 @@ w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags) else /* X version has a loop through frames here, which doesn't appear to do anything, unless it has some side effect. */ - show_help_echo (help, Qnil, Qnil, Qnil, 1); + show_help_echo (help, Qnil, Qnil, Qnil); } } diff --git a/src/xmenu.c b/src/xmenu.c index 60ac27a5b8f..8ecef00c88e 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -383,7 +383,7 @@ x_menu_wait_for_event (void *data) #endif ) { - EMACS_TIME next_time = timer_check (1), *ntp; + EMACS_TIME next_time = timer_check (), *ntp; long secs = EMACS_SECS (next_time); long usecs = EMACS_USECS (next_time); SELECT_TYPE read_fds; @@ -712,7 +712,7 @@ show_help_event (FRAME_PTR f, xt_or_gtk_widget widget, Lisp_Object help) break; } #endif - show_help_echo (help, Qnil, Qnil, Qnil, 1); + show_help_echo (help, Qnil, Qnil, Qnil); } } @@ -2201,7 +2201,7 @@ menu_help_callback (char *help_string, int pane, int item) Fcons (pane_name, Fcons (make_number (pane), Qnil))); show_help_echo (help_string ? build_string (help_string) : Qnil, - Qnil, menu_object, make_number (item), 1); + Qnil, menu_object, make_number (item)); } static Lisp_Object From 59eb0929f7ae29f9c970c4188c90c1b460e820a9 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 26 Mar 2011 03:48:03 +0100 Subject: [PATCH 122/166] src/*.c: Fix more warnings about unused parameters. * keymap.c (describe_vector): Remove parameters `indices' and `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org. (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'. * w32.c (read_unc_volume): Use parameter `henum', instead of global variable `wget_enum_handle'. --- src/ChangeLog | 7 +++++++ src/keymap.c | 13 ++++--------- src/w32.c | 6 +++--- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 69e850610bc..cc40c863e97 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2011-03-26 Juanma Barranquero + * w32.c (read_unc_volume): Use parameter `henum', instead of + global variable `wget_enum_handle'. + + * keymap.c (describe_vector): Remove parameters `indices' and + `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org. + (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'. + * keyboard.h (timer_check, show_help_echo): Remove unused parameters. * keyboard.c (timer_check): Remove parameter `do_it_now', diff --git a/src/keymap.c b/src/keymap.c index 06968a0d944..440df06ba4e 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -81,8 +81,7 @@ static void describe_map (Lisp_Object, Lisp_Object, int, Lisp_Object, Lisp_Object*, int, int); static void describe_vector (Lisp_Object, Lisp_Object, Lisp_Object, void (*) (Lisp_Object, Lisp_Object), int, - Lisp_Object, Lisp_Object, int *, - int, int, int); + Lisp_Object, Lisp_Object, int, int); static void silly_event_symbol_error (Lisp_Object); static Lisp_Object get_keyelt (Lisp_Object, int); @@ -3353,7 +3352,7 @@ describe_map (Lisp_Object map, Lisp_Object prefix, || CHAR_TABLE_P (XCAR (tail))) describe_vector (XCAR (tail), prefix, Qnil, elt_describer, partial, shadow, map, - (int *)0, 0, 1, mention_shadow); + 1, mention_shadow); else if (CONSP (XCAR (tail))) { int this_shadowed = 0; @@ -3506,7 +3505,7 @@ DESCRIBER is the output function used; nil means use `princ'. */) specbind (Qstandard_output, Fcurrent_buffer ()); CHECK_VECTOR_OR_CHAR_TABLE (vector); describe_vector (vector, Qnil, describer, describe_vector_princ, 0, - Qnil, Qnil, (int *)0, 0, 0, 0); + Qnil, Qnil, 0, 0); return unbind_to (count, Qnil); } @@ -3539,9 +3538,6 @@ DESCRIBER is the output function used; nil means use `princ'. */) ARGS is simply passed as the second argument to ELT_DESCRIBER. - INDICES and CHAR_TABLE_DEPTH are ignored. They will be removed in - the near future. - KEYMAP_P is 1 if vector is known to be a keymap, so map ESC to M-. ARGS is simply passed as the second argument to ELT_DESCRIBER. */ @@ -3550,8 +3546,7 @@ static void describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args, void (*elt_describer) (Lisp_Object, Lisp_Object), int partial, Lisp_Object shadow, Lisp_Object entire_map, - int *indices, int char_table_depth, int keymap_p, - int mention_shadow) + int keymap_p, int mention_shadow) { Lisp_Object definition; Lisp_Object tem2; diff --git a/src/w32.c b/src/w32.c index bbf777b2e1d..5643b3f073e 100644 --- a/src/w32.c +++ b/src/w32.c @@ -2376,8 +2376,8 @@ readdir (DIR *dirp) if (wnet_enum_handle != INVALID_HANDLE_VALUE) { if (!read_unc_volume (wnet_enum_handle, - dir_find_data.cFileName, - MAX_PATH)) + dir_find_data.cFileName, + MAX_PATH)) return NULL; } /* If we aren't dir_finding, do a find-first, otherwise do a find-next. */ @@ -2487,7 +2487,7 @@ read_unc_volume (HANDLE henum, char *readbuf, int size) count = 1; buffer = alloca (bufsize); - result = WNetEnumResource (wnet_enum_handle, &count, buffer, &bufsize); + result = WNetEnumResource (henum, &count, buffer, &bufsize); if (result != NO_ERROR) return NULL; From dd3f25f792d724f59fac3e2d4faa21b311f21137 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 25 Mar 2011 21:17:38 -0700 Subject: [PATCH 123/166] * alloc.c (garbage_collect): Don't assume stack size fits in int. (stack_copy_size): Now size_t, not int. (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0. --- src/ChangeLog | 6 ++++++ src/alloc.c | 33 ++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cc40c863e97..cf9ca86a798 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-03-26 Paul Eggert + + * alloc.c (garbage_collect): Don't assume stack size fits in int. + (stack_copy_size): Now size_t, not int. + (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0. + 2011-03-26 Juanma Barranquero * w32.c (read_unc_volume): Use parameter `henum', instead of diff --git a/src/alloc.c b/src/alloc.c index 66695e7a9bc..00f053e9090 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -254,8 +254,10 @@ const char *pending_malloc_warning; /* Buffer in which we save a copy of the C stack at each GC. */ +#if MAX_SAVE_STACK > 0 static char *stack_copy; -static int stack_copy_size; +static size_t stack_copy_size; +#endif /* Non-zero means ignore malloc warnings. Set during initialization. Currently not used. */ @@ -4903,21 +4905,26 @@ returns nil, because real GC can't be done. */) #if MAX_SAVE_STACK > 0 if (NILP (Vpurify_flag)) { - i = &stack_top_variable - stack_bottom; - if (i < 0) i = -i; - if (i < MAX_SAVE_STACK) + char *stack; + size_t stack_size; + if (&stack_top_variable < stack_bottom) { - if (stack_copy == 0) - stack_copy = (char *) xmalloc (stack_copy_size = i); - else if (stack_copy_size < i) - stack_copy = (char *) xrealloc (stack_copy, (stack_copy_size = i)); - if (stack_copy) + stack = &stack_top_variable; + stack_size = stack_bottom - &stack_top_variable; + } + else + { + stack = stack_bottom; + stack_size = &stack_top_variable - stack_bottom; + } + if (stack_size <= MAX_SAVE_STACK) + { + if (stack_copy_size < stack_size) { - if ((EMACS_INT) (&stack_top_variable - stack_bottom) > 0) - memcpy (stack_copy, stack_bottom, i); - else - memcpy (stack_copy, &stack_top_variable, i); + stack_copy = (char *) xrealloc (stack_copy, stack_size); + stack_copy_size = stack_size; } + memcpy (stack_copy, stack, stack_size); } } #endif /* MAX_SAVE_STACK > 0 */ From 665370491941c11a541eb62411147b73853e8aa3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 26 Mar 2011 14:20:20 +0200 Subject: [PATCH 124/166] Call try_scrolling even if buffer's clip_changed flag is set. src/xdisp.c (redisplay_window): Don't check buffer's clip_changed flag as a prerequisite for invoking try_scrolling. (Bug#6671) --- src/ChangeLog | 5 +++++ src/xdisp.c | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index cc40c863e97..06972a5bcb1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-26 Eli Zaretskii + + * xdisp.c (redisplay_window): Don't check buffer's clip_changed + flag as a prerequisite for invoking try_scrolling. (Bug#6671) + 2011-03-26 Juanma Barranquero * w32.c (read_unc_volume): Use parameter `henum', instead of diff --git a/src/xdisp.c b/src/xdisp.c index cc5d61abdb2..6f9f56df979 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -14176,7 +14176,6 @@ redisplay_window (Lisp_Object window, int just_this_one_p) || temp_scroll_step || NUMBERP (BVAR (current_buffer, scroll_up_aggressively)) || NUMBERP (BVAR (current_buffer, scroll_down_aggressively))) - && !current_buffer->clip_changed && CHARPOS (startp) >= BEGV && CHARPOS (startp) <= ZV) { From 181855e600437c16fe4137d316c1337ad5d5d791 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 26 Mar 2011 12:29:10 -0700 Subject: [PATCH 125/166] Replace some obsolete autoconf macros with their modern equivalents. * configure.in: Replace obsolete macros AC_TRY_COMPILE, AC_TRY_LINK, AC_TRY_RUN with AC_COMPILE_IFELSE, AC_LINK_IFELSE, AC_RUN_IFELSE. --- ChangeLog | 5 ++ configure.in | 144 +++++++++++++++++++++++++-------------------------- 2 files changed, 77 insertions(+), 72 deletions(-) diff --git a/ChangeLog b/ChangeLog index d962373a4d2..2129d2991bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-03-26 Glenn Morris + + * configure.in: Replace obsolete macros AC_TRY_COMPILE, AC_TRY_LINK, + AC_TRY_RUN with AC_COMPILE_IFELSE, AC_LINK_IFELSE, AC_RUN_IFELSE. + 2011-03-25 Andreas Schwab * autogen/update_autogen: Remove useless function keyword. diff --git a/configure.in b/configure.in index f450b890823..fb71b82c464 100644 --- a/configure.in +++ b/configure.in @@ -664,11 +664,11 @@ if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ test x"$CPP" = x; then AC_MSG_CHECKING([whether we are using a Sun C compiler]) AC_CACHE_VAL(emacs_cv_sunpro_c, - [AC_TRY_LINK([], -[#ifndef __SUNPRO_C + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], +[[#ifndef __SUNPRO_C fail; #endif -], emacs_cv_sunpro_c=yes, emacs_cv_sunpro_c=no)]) +]])], emacs_cv_sunpro_c=yes, emacs_cv_sunpro_c=no)]) AC_MSG_RESULT($emacs_cv_sunpro_c) if test x"$emacs_cv_sunpro_c" = xyes; then @@ -703,7 +703,7 @@ fi AC_MSG_CHECKING([whether gcc understands -Wdeclaration-after-statement]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wdeclaration-after-statement" -AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) if test $has_option = yes; then C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" fi @@ -717,7 +717,7 @@ unset SAVE_CFLAGS AC_MSG_CHECKING([whether gcc understands -Wold-style-definition]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wold-style-definition" -AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) if test $has_option = yes; then C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" fi @@ -730,7 +730,7 @@ unset SAVE_CFLAGS AC_MSG_CHECKING([whether gcc understands -Wimplicit-function-declaration]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wimplicit-function-declaration" -AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) if test $has_option = yes; then C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" fi @@ -1137,12 +1137,12 @@ if test "${with_sound}" != "no"; then SAVE_LDFLAGS="$LDFLAGS" CFLAGS="$ALSA_CFLAGS $CFLAGS" LDFLAGS="$ALSA_LIBS $LDFLAGS" - AC_TRY_COMPILE([#include ], [snd_lib_error_set_handler (0);], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[snd_lib_error_set_handler (0);]])], emacs_alsa_normal=yes, emacs_alsa_normal=no) if test "$emacs_alsa_normal" != yes; then - AC_TRY_COMPILE([#include ], - [snd_lib_error_set_handler (0);], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[snd_lib_error_set_handler (0);]])], emacs_alsa_subdir=yes, emacs_alsa_subdir=no) if test "$emacs_alsa_subdir" != yes; then @@ -1181,7 +1181,7 @@ AC_CHECK_HEADERS(sys/select.h sys/time.h unistd.h utime.h \ sys/utsname.h pwd.h utmp.h dirent.h util.h) AC_MSG_CHECKING(if personality LINUX32 can be set) -AC_TRY_COMPILE([#include ], [personality (PER_LINUX32)], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[personality (PER_LINUX32)]])], emacs_cv_personality_linux32=yes, emacs_cv_personality_linux32=no) AC_MSG_RESULT($emacs_cv_personality_linux32) @@ -1209,7 +1209,7 @@ AC_HEADER_SYS_WAIT dnl Some systems have utime.h but don't declare the struct anyplace. AC_CACHE_CHECK(for struct utimbuf, emacs_cv_struct_utimbuf, -AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME #include #include #else @@ -1221,7 +1221,7 @@ AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME #endif #ifdef HAVE_UTIME_H #include -#endif], [static struct utimbuf x; x.actime = x.modtime;], +#endif]], [[static struct utimbuf x; x.actime = x.modtime;]])], emacs_cv_struct_utimbuf=yes, emacs_cv_struct_utimbuf=no)) if test $emacs_cv_struct_utimbuf = yes; then AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, [Define to 1 if `struct utimbuf' is declared by .]) @@ -1232,7 +1232,7 @@ AC_TYPE_SIGNAL dnl Check for speed_t typedef. AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t, - [AC_TRY_COMPILE([#include ], [speed_t x = 1;], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[speed_t x = 1;]])], emacs_cv_speed_t=yes, emacs_cv_speed_t=no)]) if test $emacs_cv_speed_t = yes; then AC_DEFINE(HAVE_SPEED_T, 1, @@ -1240,7 +1240,7 @@ if test $emacs_cv_speed_t = yes; then fi AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval, -AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME #include #include #else @@ -1249,7 +1249,7 @@ AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME #else #include #endif -#endif], [static struct timeval x; x.tv_sec = x.tv_usec;], +#endif]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])], emacs_cv_struct_timeval=yes, emacs_cv_struct_timeval=no)) HAVE_TIMEVAL=$emacs_cv_struct_timeval if test $emacs_cv_struct_timeval = yes; then @@ -1257,8 +1257,8 @@ if test $emacs_cv_struct_timeval = yes; then fi AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception, -AC_TRY_COMPILE([#include ], -[static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], +[[static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;]])], emacs_cv_struct_exception=yes, emacs_cv_struct_exception=no)) HAVE_EXCEPTION=$emacs_cv_struct_exception if test $emacs_cv_struct_exception != yes; then @@ -1301,7 +1301,7 @@ dnl This isn't useful because we can't turn on use of `inline' unless dnl the compiler groks `extern inline'. dnl AC_C_INLINE AC_CACHE_CHECK([for void * support], emacs_cv_void_star, - [AC_TRY_COMPILE(, [void * foo;], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[void * foo;]])], emacs_cv_void_star=yes, emacs_cv_void_star=no)]) if test $emacs_cv_void_star = yes; then AC_DEFINE(POINTER_TYPE, void) @@ -1349,7 +1349,7 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then AC_MSG_CHECKING([whether gcc understands -MMD -MF]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -MMD -MF deps.d" - AC_TRY_COMPILE([], [], , ac_enable_autodepend=no) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], , ac_enable_autodepend=no) CFLAGS="$SAVE_CFLAGS" test -f deps.d || ac_enable_autodepend=no rm -rf deps.d @@ -1582,7 +1582,7 @@ AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no) AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) AC_CACHE_CHECK(whether __after_morecore_hook exists, emacs_cv_var___after_morecore_hook, -[AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0], +[AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern void (* __after_morecore_hook)();]],[[__after_morecore_hook = 0]])], emacs_cv_var___after_morecore_hook=yes, emacs_cv_var___after_morecore_hook=no)]) if test $emacs_cv_var___after_morecore_hook = no; then @@ -1680,7 +1680,7 @@ aix*) esac LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc - AC_TRY_LINK([], [int i;], [], [gdb_cv_bigtoc=]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;]])], [], [gdb_cv_bigtoc=]) ]) ;; esac @@ -1710,8 +1710,8 @@ if test "${HAVE_X11}" = "yes"; then if test "${opsys}" = "gnu-linux"; then AC_MSG_CHECKING(whether X on GNU/Linux needs -b to link) - AC_TRY_LINK([], - [XOpenDisplay ("foo");], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], + [[XOpenDisplay ("foo");]])], [xlinux_first_failure=no], [xlinux_first_failure=yes]) if test "${xlinux_first_failure}" = "yes"; then @@ -1723,8 +1723,8 @@ if test "${HAVE_X11}" = "yes"; then C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" CPPFLAGS="$CPPFLAGS -b i486-linuxaout" LIBS="$LIBS -b i486-linuxaout" - AC_TRY_LINK([], - [XOpenDisplay ("foo");], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], + [[XOpenDisplay ("foo");]])], [xlinux_second_failure=no], [xlinux_second_failure=yes]) if test "${xlinux_second_failure}" = "yes"; then @@ -1746,9 +1746,9 @@ if test "${HAVE_X11}" = "yes"; then # Reportedly, some broken Solaris systems have XKBlib.h but are missing # header files included from there. AC_MSG_CHECKING(for Xkb) - AC_TRY_LINK([#include -#include ], - [XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]], + [[XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);]])], emacs_xkb=yes, emacs_xkb=no) AC_MSG_RESULT($emacs_xkb) if test $emacs_xkb = yes; then @@ -1762,11 +1762,11 @@ fi if test "${window_system}" = "x11"; then AC_MSG_CHECKING(X11 version 6) AC_CACHE_VAL(emacs_cv_x11_version_6, - [AC_TRY_LINK([#include ], -[#if XlibSpecificationRelease < 6 + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], +[[#if XlibSpecificationRelease < 6 fail; #endif -], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)]) +]])], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)]) if test $emacs_cv_x11_version_6 = yes; then AC_MSG_RESULT(6 or newer) AC_DEFINE(HAVE_X11R6, 1, @@ -1989,10 +1989,10 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then if test "$with_xaw3d" != no; then AC_MSG_CHECKING(for xaw3d) AC_CACHE_VAL(emacs_cv_xaw3d, - [AC_TRY_LINK([ + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include -#include ], - [], +#include ]], + [[]])], [AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, emacs_cv_xaw3d=yes, emacs_cv_xaw3d=no)], emacs_cv_xaw3d=no)]) @@ -2010,10 +2010,10 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then AC_MSG_RESULT(no) AC_MSG_CHECKING(for libXaw) AC_CACHE_VAL(emacs_cv_xaw, - [AC_TRY_LINK([ + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include -#include ], - [], +#include ]], + [[]])], emacs_cv_xaw=yes, emacs_cv_xaw=no)]) if test $emacs_cv_xaw = yes; then @@ -2035,11 +2035,11 @@ LIBXTR6= if test "${USE_X_TOOLKIT}" != "none"; then AC_MSG_CHECKING(X11 toolkit version) AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6, - [AC_TRY_LINK([#include ], -[#if XtSpecificationRelease < 6 + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], +[[#if XtSpecificationRelease < 6 fail; #endif -], emacs_cv_x11_toolkit_version_6=yes, emacs_cv_x11_toolkit_version_6=no)]) +]])], emacs_cv_x11_toolkit_version_6=yes, emacs_cv_x11_toolkit_version_6=no)]) HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 if test $emacs_cv_x11_toolkit_version_6 = yes; then AC_MSG_RESULT(6 or newer) @@ -2088,12 +2088,12 @@ fi LIBXP= if test "${USE_X_TOOLKIT}" = "MOTIF"; then AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, - [AC_TRY_COMPILE([#include ], - [#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) int x = 5; #else Motif version prior to 2.1. -#endif], +#endif]])], emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)]) if test $emacs_cv_motif_version_2_1 = yes; then AC_CHECK_LIB(Xp, XpCreateContext, LIBXP=-lXp) @@ -2106,8 +2106,8 @@ Motif version prior to 2.1. OLD_CFLAGS=$CFLAGS CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" - [AC_TRY_COMPILE([#include ], - [int x = 5;], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[int x = 5;]])], emacs_cv_lesstif=yes, emacs_cv_lesstif=no)]) if test $emacs_cv_lesstif = yes; then # Make sure this -I option remains in CPPFLAGS after it is set @@ -2151,10 +2151,10 @@ if test "${with_toolkit_scroll_bars}" != "no"; then fi dnl See if XIM is available. -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include - #include ], - [XIMProc callback;], + #include ]], + [[XIMProc callback;]])], [HAVE_XIM=yes AC_DEFINE(HAVE_XIM, 1, [Define to 1 if XIM is available])], HAVE_XIM=no) @@ -2172,10 +2172,10 @@ if test "${HAVE_XIM}" != "no"; then if test "$GCC" = yes; then CFLAGS="$CFLAGS --pedantic-errors" fi - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include -#include ], -[Display *display; +#include ]], +[[Display *display; XrmDatabase db; char *res_name; char *res_class; @@ -2188,7 +2188,7 @@ extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, char*, XIMProc, XPointer*); #endif (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, - client_data);], + client_data);]])], [emacs_cv_arg6_star=yes]) AH_TEMPLATE(XRegisterIMInstantiateCallback_arg6, [Define to the type of the 6th arg of XRegisterIMInstantiateCallback, @@ -2540,8 +2540,8 @@ AC_SUBST(LIBXML2_CFLAGS) # If netdb.h doesn't declare h_errno, we must declare it by hand. AC_CACHE_CHECK(whether netdb declares h_errno, emacs_cv_netdb_declares_h_errno, -[AC_TRY_LINK([#include ], - [return h_errno;], +[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[return h_errno;]])], emacs_cv_netdb_declares_h_errno=yes, emacs_cv_netdb_declares_h_errno=no)]) if test $emacs_cv_netdb_declares_h_errno = yes; then AC_DEFINE(HAVE_H_ERRNO, 1, [Define to 1 if netdb.h declares h_errno.]) @@ -2722,11 +2722,11 @@ case "$opsys" in freebsd) AC_MSG_CHECKING([whether FreeBSD is new enough to use terminfo]) AC_CACHE_VAL(emacs_cv_freebsd_terminfo, - [AC_TRY_LINK([#include ], -[#if __FreeBSD_version < 400000 + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], +[[#if __FreeBSD_version < 400000 fail; #endif -], emacs_cv_freebsd_terminfo=yes, emacs_cv_freebsd_terminfo=no)]) +]])], emacs_cv_freebsd_terminfo=yes, emacs_cv_freebsd_terminfo=no)]) AC_MSG_RESULT($emacs_cv_freebsd_terminfo) @@ -2776,19 +2776,19 @@ AC_SUBST(TERMCAP_OBJ) # Do we have res_init, for detecting changes in /etc/resolv.conf? resolv=no -AC_TRY_LINK([#include +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include #include -#include ], - [return res_init();], +#include ]], + [[return res_init();]])], have_res_init=yes, have_res_init=no) if test "$have_res_init" = no; then OLIBS="$LIBS" LIBS="$LIBS -lresolv" AC_MSG_CHECKING(for res_init with -lresolv) - AC_TRY_LINK([#include + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include #include -#include ], - [return res_init();], +#include ]], + [[return res_init();]])], have_res_init=yes, have_res_init=no) AC_MSG_RESULT($have_res_init) if test "$have_res_init" = yes ; then @@ -2924,7 +2924,7 @@ AC_CHECK_LIB(intl, dgettext) AC_MSG_CHECKING(whether localtime caches TZ) AC_CACHE_VAL(emacs_cv_localtime_cache, [if test x$ac_cv_func_tzset = xyes; then -AC_TRY_RUN([#include +AC_RUN_IFELSE([AC_LANG_SOURCE([[#include char TZ_GMT0[] = "TZ=GMT0"; char TZ_PST8[] = "TZ=PST8"; main() @@ -2944,7 +2944,7 @@ main() if (localtime (&now)->tm_hour != hour_unset) exit (1); exit (0); -}], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes, +}]])], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes, [# If we have tzset, assume the worst when cross-compiling. emacs_cv_localtime_cache=yes]) else @@ -2963,7 +2963,7 @@ if test "x$HAVE_TIMEVAL" = xyes; then if test $ac_cv_func_gettimeofday = yes; then AC_CACHE_CHECK(whether gettimeofday can accept two arguments, emacs_cv_gettimeofday_two_arguments, - [AC_TRY_COMPILE([ + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #ifdef TIME_WITH_SYS_TIME #include #include @@ -2973,9 +2973,9 @@ if test "x$HAVE_TIMEVAL" = xyes; then #else #include #endif -#endif], - [struct timeval time; - gettimeofday (&time, 0);], +#endif]], + [[struct timeval time; + gettimeofday (&time, 0);]])], emacs_cv_gettimeofday_two_arguments=yes, emacs_cv_gettimeofday_two_arguments=no)]) if test $emacs_cv_gettimeofday_two_arguments = no; then @@ -3016,8 +3016,8 @@ AC_FUNC_FORK dnl Adapted from Haible's version. AC_CACHE_CHECK([for nl_langinfo and CODESET], emacs_cv_langinfo_codeset, - [AC_TRY_LINK([#include ], - [char* cs = nl_langinfo(CODESET);], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[char* cs = nl_langinfo(CODESET);]])], emacs_cv_langinfo_codeset=yes, emacs_cv_langinfo_codeset=no) ]) @@ -3031,7 +3031,7 @@ AC_CHECK_TYPES(size_t) AC_TYPE_MBSTATE_T AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr, - [AC_TRY_COMPILE([void fred (int x[__restrict]);], [], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void fred (int x[__restrict]);]], [[]])], emacs_cv_c_restrict_arr=yes, emacs_cv_c_restrict_arr=no)]) if test "$emacs_cv_c_restrict_arr" = yes; then AC_DEFINE(__restrict_arr, __restrict, From f2eefd24778eb8d577ea09a5c2d28b4df1471b8b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 26 Mar 2011 19:18:42 -0400 Subject: [PATCH 126/166] Changes to open-protocol-stream, preparing for merging it with open-network-stream. * lisp/gnus/proto-stream.el: Changes preparatory to merging open-protocol-stream with open-network-stream. (proto-stream-always-use-starttls): Option removed. (open-protocol-stream): Return a process object by default. Provide a new parameter :return-list specifying a list-type return value, which now has the form (PROP . PLIST) instead of a fixed-length list. Change :type `network' to `try-starttls', and `network-only' to `default'. Make `default' the default, for compatibility with open-network-stream. Handle the no-parameter case exactly as open-network-stream, with no additional stream processing. Search plists using plist-get. Explicitly add :end-of-commend parameter if it is missing. (proto-stream-open-default): Renamed from proto-stream-open-network-only. Return 'default as the type. (proto-stream-open-starttls): Rename from proto-stream-open-network. Use plist-get. Don't return `tls' as the type if STARTTLS negotiation failed. Always return a list with a (possibly dead) process as the first element, for compatibility with open-network-stream. (proto-stream-open-tls): Use plist-get. Always return a list. (proto-stream-open-shell): Return `default' as connection type. (proto-stream-capability-open): Use plist-get. (proto-stream-eoc): Function deleted. * lisp/gnus/nnimap.el (nnimap-stream, nnimap-open-connection) (nnimap-open-connection-1): Handle renaming of :type parameter for open-protocol-stream. (nnimap-open-connection-1): Pass a :return-list parameter open-protocol-stream to obtain a list return value. Parse this list using plist-get. * lisp/gnus/nntp.el (nntp-open-connection): Handle renaming of :type parameter for open-protocol-stream. Accept open-protocol-stream return value that is a subprocess object instead of a list. Handle the case of a dead returned process. --- lisp/gnus/ChangeLog | 36 +++++ lisp/gnus/nnimap.el | 41 ++--- lisp/gnus/nntp.el | 33 +++-- lisp/gnus/proto-stream.el | 305 ++++++++++++++++++-------------------- 4 files changed, 224 insertions(+), 191 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index ddc946383b6..f257ff51f3d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,39 @@ +2011-03-26 Chong Yidong + + * proto-stream.el: Changes preparatory to merging open-protocol-stream + with open-network-stream. + (proto-stream-always-use-starttls): Option removed. + (open-protocol-stream): Return a process object by default. Provide a + new parameter :return-list specifying a list-type return value, which + now has the form (PROP . PLIST) instead of a fixed-length list. Change + :type `network' to `try-starttls', and `network-only' to `default'. + Make `default' the default, for compatibility with open-network-stream. + Handle the no-parameter case exactly as open-network-stream, with no + additional stream processing. Search plists using plist-get. + Explicitly add :end-of-commend parameter if it is missing. + (proto-stream-open-default): Renamed from + proto-stream-open-network-only. Return 'default as the type. + (proto-stream-open-starttls): Rename from proto-stream-open-network. + Use plist-get. Don't return `tls' as the type if STARTTLS negotiation + failed. Always return a list with a (possibly dead) process as the + first element, for compatibility with open-network-stream. + (proto-stream-open-tls): Use plist-get. Always return a list. + (proto-stream-open-shell): Return `default' as connection type. + (proto-stream-capability-open): Use plist-get. + (proto-stream-eoc): Function deleted. + + * nnimap.el (nnimap-stream, nnimap-open-connection) + (nnimap-open-connection-1): Handle renaming of :type parameter for + open-protocol-stream. + (nnimap-open-connection-1): Pass a :return-list parameter + open-protocol-stream to obtain a list return value. Parse this list + using plist-get. + + * nntp.el (nntp-open-connection): Handle renaming of :type parameter + for open-protocol-stream. Accept open-protocol-stream return value + that is a subprocess object instead of a list. Handle the case of a + dead returned process. + 2011-03-25 Teodor Zlatanov * mm-util.el (mm-handle-filename): Move to mm-decode.el (bug#8330). diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index bcbe7b678d5..15d7f463d41 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -62,9 +62,9 @@ it will default to `imap'.") (defvoo nnimap-stream 'undecided "How nnimap will talk to the IMAP server. -Values are `ssl', `network', `network-only, `starttls' or +Values are `ssl', `default', `try-starttls', `starttls' or `shell'. The default is to try `ssl' first, and then -`network'.") +`try-starttls'.") (defvoo nnimap-shell-program (if (boundp 'imap-shell-program) (if (listp imap-shell-program) @@ -319,7 +319,7 @@ textual parts.") (setq nnimap-stream 'ssl)) (let ((stream (if (eq nnimap-stream 'undecided) - (loop for type in '(ssl network) + (loop for type in '(ssl try-starttls) for stream = (let ((nnimap-stream type)) (nnimap-open-connection-1 buffer)) while (eq stream 'no-connect) @@ -339,9 +339,7 @@ textual parts.") (port nil) (ports (cond - ((or (eq nnimap-stream 'network) - (eq nnimap-stream 'network-only) - (eq nnimap-stream 'starttls)) + ((memq nnimap-stream '(try-starttls default starttls)) (nnheader-message 7 "Opening connection to %s..." nnimap-address) '("imap" "143")) @@ -355,21 +353,28 @@ textual parts.") '("imaps" "imap" "993" "143")) (t (error "Unknown stream type: %s" nnimap-stream)))) - (proto-stream-always-use-starttls t) login-result credentials) (when nnimap-server-port (push nnimap-server-port ports)) - (destructuring-bind (stream greeting capabilities stream-type) - (open-protocol-stream - "*nnimap*" (current-buffer) nnimap-address (car ports) - :type nnimap-stream - :shell-command nnimap-shell-program - :capability-command "1 CAPABILITY\r\n" - :success " OK " - :starttls-function - (lambda (capabilities) - (when (gnus-string-match-p "STARTTLS" capabilities) - "1 STARTTLS\r\n"))) + (let* ((stream-list + (open-protocol-stream + "*nnimap*" (current-buffer) nnimap-address (car ports) + :type nnimap-stream + :return-list t + :shell-command nnimap-shell-program + :capability-command "1 CAPABILITY\r\n" + :success " OK " + :starttls-function + (lambda (capabilities) + (when (gnus-string-match-p "STARTTLS" capabilities) + "1 STARTTLS\r\n")))) + (stream (car stream-list)) + (props (cdr stream-list)) + (greeting (plist-get props :greeting)) + (capabilities (plist-get props :capabilities)) + (stream-type (plist-get props :type))) + (when (and stream (not (memq (process-status stream) '(open run)))) + (setq stream nil)) (setf (nnimap-process nnimap-object) stream) (setf (nnimap-stream-type nnimap-object) stream-type) (if (not stream) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 66a6365cb3b..9065027d34f 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -1339,26 +1339,26 @@ password contained in '~/.nntp-authinfo'." (condition-case err (let ((coding-system-for-read nntp-coding-system-for-read) (coding-system-for-write nntp-coding-system-for-write) - (map '((nntp-open-network-stream network) - (network-only network-only) + (map '((nntp-open-network-stream try-starttls) + (network-only default) (nntp-open-ssl-stream tls) (nntp-open-tls-stream tls)))) (if (assoc nntp-open-connection-function map) - (car (open-protocol-stream - "nntpd" pbuffer nntp-address nntp-port-number - :type (cadr - (assoc nntp-open-connection-function map)) - :end-of-command "^\\([2345]\\|[.]\\).*\n" - :capability-command "CAPABILITIES\r\n" - :success "^3" - :starttls-function - (lambda (capabilities) - (if (not (string-match "STARTTLS" capabilities)) - nil - "STARTTLS\r\n")))) + (open-protocol-stream + "nntpd" pbuffer nntp-address nntp-port-number + :type (or (cadr (assoc nntp-open-connection-function map)) + 'try-starttls) + :end-of-command "^\\([2345]\\|[.]\\).*\n" + :capability-command "CAPABILITIES\r\n" + :success "^3" + :starttls-function + (lambda (capabilities) + (if (not (string-match "STARTTLS" capabilities)) + nil + "STARTTLS\r\n"))) (funcall nntp-open-connection-function pbuffer))) (error - (nnheader-report 'nntp "%s" err)) + (nnheader-report 'nntp ">>> %s" err)) (quit (message "Quit opening connection to %s" nntp-address) (nntp-kill-buffer pbuffer) @@ -1366,6 +1366,9 @@ password contained in '~/.nntp-authinfo'." nil)))) (when timer (nnheader-cancel-timer timer)) + (when (and process + (not (memq (process-status process) '(open run)))) + (setq process nil)) (unless process (nntp-kill-buffer pbuffer)) (when (and (buffer-name pbuffer) diff --git a/lisp/gnus/proto-stream.el b/lisp/gnus/proto-stream.el index fdf2abfea05..5e92cb40264 100644 --- a/lisp/gnus/proto-stream.el +++ b/lisp/gnus/proto-stream.el @@ -37,7 +37,7 @@ ;; (open-protocol-stream ;; "*nnimap*" buffer address port -;; :type 'network +;; :type 'try-starttls ;; :capability-command "1 CAPABILITY\r\n" ;; :success " OK " ;; :starttls-function @@ -48,171 +48,164 @@ ;;; Code: -(eval-when-compile - (require 'cl)) (require 'tls) (require 'starttls) -(require 'format-spec) - -(defcustom proto-stream-always-use-starttls (fboundp 'open-gnutls-stream) - "If non-nil, always try to upgrade network connections with STARTTLS." - :version "24.1" - :type 'boolean - :group 'comm) (declare-function gnutls-negotiate "gnutls" (proc type &optional priority-string trustfiles keyfiles)) ;;;###autoload (defun open-protocol-stream (name buffer host service &rest parameters) - "Open a network stream to HOST, upgrading to STARTTLS if possible. -The first four parameters have the same meaning as in -`open-network-stream'. The function returns a list where the -first element is the stream, the second element is the greeting -the server replied with after connecting, and the third element -is a string representing the capabilities of the server (if any). + "Open a network stream to HOST, possibly with encryption. +Normally, return a network process object; with a non-nil +:return-list parameter, return a list instead (see below). -The PARAMETERS is a keyword list that can have the following -values: +The first four parameters, NAME, BUFFER, HOST, and SERVICE, have +the same meanings as in `open-network-stream'. The remaining +PARAMETERS should be a sequence of keywords and values: -:type -- either `network', `network-only, `tls', `shell' or -`starttls'. If omitted, the default is `network'. `network' -will be opportunistically upgraded to STARTTLS if both the server -and Emacs supports it. If you don't want STARTTLS upgrades, use -`network-only'. +:type specifies the connection type, one of the following: + `default' -- An ordinary network connection. + `try-starttls' + -- Begin an ordinary network connection, and try + upgrading it to an encrypted connection via + STARTTLS if both HOST and Emacs support TLS. If + that fails, keep the unencrypted connection. + `starttls' -- Begin an ordinary connection, and try upgrading + it via STARTTLS. If that fails for any reason, + drop the connection; in this case, the returned + process object is a killed process. + `tls' or `ssl' -- A TLS connection. + `shell' -- A shell connection. -:end-of-command -- a regexp saying what the end of a command is. -This defaults to \"\\n\". +:return-list specifies this function's return value. + If omitted or nil, return a process object. A non-nil means to + return (PROC . PROPS), where PROC is a process object and PROPS + is a plist of connection properties, with these keywords: + :greeting -- the greeting returned by HOST (a string), or nil. + :capabilities -- a string representing HOST's capabilities, + or nil if none could be found. + :type -- the actual connection type; either `default' for an + unencrypted connection, or `tls'. -:success -- a regexp saying whether the STARTTLS command was -successful or not. For instance, for NNTP this is \"^3\". +:end-of-command specifies a regexp matching the end of a command. + If non-nil, it defaults to \"\\n\". -:capability-command -- a string representing the command used to -query server for capabilities. For instance, for IMAP this is -\"1 CAPABILITY\\r\\n\". +:success specifies a regexp matching a message indicating a + successful STARTTLS negotiation. For instance, the default + should be \"^3\" for an NNTP connection. If this is not + supplied, STARTTLS will always fail. -:starttls-function -- a function that takes one parameter, which -is the response to the capaibility command. It should return nil -if it turns out that the server doesn't support STARTTLS, or the -command to switch on STARTTLS otherwise. +:capability-command specifies a command used to query the HOST + for its capabilities. For instance, for IMAP this should be + \"1 CAPABILITY\\r\\n\". -The return value from this function is a four-element list, where -the first element is the stream (if connection was successful); -the second element is the \"greeting\", i. e., the string the -server sent over on initial contact; the third element is the -capability string; and the fourth element is either `network' or -`tls', depending on whether the connection ended up being -encrypted or not." - (let ((type (or (cadr (memq :type parameters)) 'network))) - (cond - ((eq type 'starttls) - (setq type 'network)) - ((eq type 'ssl) - (setq type 'tls))) - (let ((open-result - (funcall (intern (format "proto-stream-open-%s" type) obarray) - name buffer host service parameters))) - (if (null open-result) - (list nil nil nil type) - (let ((stream (car open-result))) - (list (and stream - (memq (process-status stream) - '(open run)) - stream) - (nth 1 open-result) - (nth 2 open-result) - (nth 3 open-result))))))) +:starttls-function specifies a function for handling STARTTLS. + This function should take one parameter, the response to the + capability command, and should return the command to switch on + STARTTLS if the server supports STARTTLS, and nil otherwise." + (let ((type (plist-get parameters :type)) + (return-list (plist-get parameters :return-list))) + (if (and (null return-list) (memq type '(nil default))) + ;; The simplest case---no encryption, and no need to report + ;; connection properties. Like `open-network-stream', this + ;; doesn't read anything into BUFFER yet. + (open-network-stream name buffer host service) + ;; For everything else, refer to proto-stream-open-*. + (unless (plist-get parameters :end-of-command) + (setq parameters + (append '(:end-of-command "\r\n") parameters))) + (let* ((connection-function + (cond + ((memq type '(nil default)) + 'proto-stream-open-default) + ((memq type '(try-starttls starttls)) + 'proto-stream-open-starttls) + ((memq type '(tls ssl)) + 'proto-stream-open-tls) + ((eq type 'shell) + 'proto-stream-open-shell) + (t + (error "Invalid connection type %s" type)))) + (result (funcall connection-function + name buffer host service parameters))) + (if return-list + (list (car result) + :greeting (nth 1 result) + :capabilities (nth 2 result) + :type (nth 3 result)) + (car result)))))) -(defun proto-stream-open-network-only (name buffer host service parameters) +(defun proto-stream-open-default (name buffer host service parameters) (let ((start (with-current-buffer buffer (point))) (stream (open-network-stream name buffer host service))) (list stream - (proto-stream-get-response - stream start (proto-stream-eoc parameters)) + (proto-stream-get-response stream start + (plist-get parameters :end-of-command)) nil - 'network))) + 'default))) -(defun proto-stream-open-network (name buffer host service parameters) +(defun proto-stream-open-starttls (name buffer host service parameters) (let* ((start (with-current-buffer buffer (point))) + ;; This should be `starttls' or `try-starttls'. + (type (plist-get parameters :type)) + (starttls-function (plist-get parameters :starttls-function)) + (success-string (plist-get parameters :success)) + (capability-command (plist-get parameters :capability-command)) + (eoc (plist-get parameters :end-of-command)) + ;; Return (STREAM GREETING CAPABILITIES RESULTING-TYPE) (stream (open-network-stream name buffer host service)) - (capability-command (cadr (memq :capability-command parameters))) - (eoc (proto-stream-eoc parameters)) - (type (cadr (memq :type parameters))) (greeting (proto-stream-get-response stream start eoc)) - success) - (if (not capability-command) - (list stream greeting nil 'network) - (let* ((capabilities - (proto-stream-command stream capability-command eoc)) - (starttls-command - (funcall (cadr (memq :starttls-function parameters)) - capabilities))) - (cond - ;; If this server doesn't support STARTTLS, but we have - ;; requested it explicitly, then close the connection and - ;; return nil. - ((or (not starttls-command) - (and (not (eq type 'starttls)) - (not proto-stream-always-use-starttls))) - (if (eq type 'starttls) - (progn - (delete-process stream) - nil) - ;; Otherwise, just return this plain network connection. - (list stream greeting capabilities 'network))) - ;; We have some kind of STARTTLS support, so we try to - ;; upgrade the connection opportunistically. - ((or (fboundp 'open-gnutls-stream) - (executable-find "gnutls-cli")) - (unless (fboundp 'open-gnutls-stream) - (delete-process stream) - (setq start (with-current-buffer buffer (point-max))) - (let* ((starttls-use-gnutls t) - (starttls-extra-arguments - (if (not (eq type 'starttls)) - ;; When doing opportunistic TLS upgrades we - ;; don't really care about the identity of the - ;; peer. - (cons "--insecure" starttls-extra-arguments) - starttls-extra-arguments))) - (setq stream (starttls-open-stream name buffer host service))) - (proto-stream-get-response stream start eoc)) - (if (not - (string-match - (cadr (memq :success parameters)) - (proto-stream-command stream starttls-command eoc))) - ;; We got an error back from the STARTTLS command. - (progn - (if (eq type 'starttls) - (progn - (delete-process stream) - nil) - (list stream greeting capabilities 'network))) - ;; The server said it was OK to start doing STARTTLS negotiations. - (if (fboundp 'open-gnutls-stream) - (gnutls-negotiate stream nil) - (unless (starttls-negotiate stream) - (delete-process stream) - (setq stream nil))) - (when (or (null stream) - (not (memq (process-status stream) - '(open run)))) - ;; It didn't successfully negotiate STARTTLS, so we reopen - ;; the connection. - (setq stream (open-network-stream name buffer host service)) - (proto-stream-get-response stream start eoc)) - ;; Re-get the capabilities, since they may have changed - ;; after switching to TLS. - (list stream greeting - (proto-stream-command stream capability-command eoc) 'tls))) - ;; We don't have STARTTLS support available, but the caller - ;; requested a STARTTLS connection, so we give up. - ((eq (cadr (memq :type parameters)) 'starttls) - (delete-process stream) - nil) - ;; Fall back on using a plain network stream. - (t - (list stream greeting capabilities 'network))))))) + (capabilities (when capability-command + (proto-stream-command stream + capability-command eoc))) + (resulting-type 'default) + starttls-command) + + ;; If we have STARTTLS support, try to upgrade the connection. + (when (and (or (fboundp 'open-gnutls-stream) + (executable-find "gnutls-cli")) + capabilities success-string starttls-function + (setq starttls-command + (funcall starttls-function capabilities))) + ;; If using external STARTTLS, drop this connection and start + ;; anew with `starttls-open-stream'. + (unless (fboundp 'open-gnutls-stream) + (delete-process stream) + (setq start (with-current-buffer buffer (point-max))) + (let* ((starttls-use-gnutls t) + (starttls-extra-arguments + (if (not (eq type 'starttls)) + ;; For opportunistic TLS upgrades, we don't + ;; really care about the identity of the peer. + (cons "--insecure" starttls-extra-arguments) + starttls-extra-arguments))) + (setq stream (starttls-open-stream name buffer host service))) + (proto-stream-get-response stream start eoc)) + (when (string-match success-string + (proto-stream-command stream starttls-command eoc)) + ;; The server said it was OK to begin STARTTLS negotiations. + (if (fboundp 'open-gnutls-stream) + (gnutls-negotiate stream nil) + (unless (starttls-negotiate stream) + (delete-process stream))) + (if (memq (process-status stream) '(open run)) + (setq resulting-type 'tls) + ;; We didn't successfully negotiate STARTTLS; if TLS + ;; isn't demanded, reopen an unencrypted connection. + (when (eq type 'try-starttls) + (setq stream (open-network-stream name buffer host service)) + (proto-stream-get-response stream start eoc))) + ;; Re-get the capabilities, which may have now changed. + (setq capabilities + (proto-stream-command stream capability-command eoc)))) + + ;; If TLS is mandatory, close the connection if it's unencrypted. + (and (eq type 'starttls) + (eq resulting-type 'default) + (delete-process stream)) + ;; Return value: + (list stream greeting capabilities resulting-type))) (defun proto-stream-command (stream command eoc) (let ((start (with-current-buffer (process-buffer stream) (point-max)))) @@ -241,47 +234,43 @@ encrypted or not." (funcall (if (fboundp 'open-gnutls-stream) 'open-gnutls-stream 'open-tls-stream) - name buffer host service))) + name buffer host service)) + (eoc (plist-get parameters :end-of-command))) (if (null stream) - nil + (list nil nil nil 'default) ;; If we're using tls.el, we have to delete the output from ;; openssl/gnutls-cli. (unless (fboundp 'open-gnutls-stream) - (proto-stream-get-response - stream start (proto-stream-eoc parameters)) + (proto-stream-get-response stream start eoc) (goto-char (point-min)) - (when (re-search-forward (proto-stream-eoc parameters) nil t) + (when (re-search-forward eoc nil t) (goto-char (match-beginning 0)) (delete-region (point-min) (line-beginning-position)))) (proto-stream-capability-open start stream parameters 'tls))))) (defun proto-stream-open-shell (name buffer host service parameters) + (require 'format-spec) (proto-stream-capability-open (with-current-buffer buffer (point)) (let ((process-connection-type nil)) (start-process name buffer shell-file-name shell-command-switch (format-spec - (cadr (memq :shell-command parameters)) + (plist-get parameters :shell-command) (format-spec-make ?s host ?p service)))) - parameters 'network)) + parameters 'default)) (defun proto-stream-capability-open (start stream parameters stream-type) - (let ((capability-command (cadr (memq :capability-command parameters))) - (greeting (proto-stream-get-response - stream start (proto-stream-eoc parameters)))) + (let* ((capability-command (plist-get parameters :capability-command)) + (eoc (plist-get parameters :end-of-command)) + (greeting (proto-stream-get-response stream start eoc))) (list stream greeting (and capability-command - (proto-stream-command - stream capability-command (proto-stream-eoc parameters))) + (proto-stream-command stream capability-command eoc)) stream-type))) -(defun proto-stream-eoc (parameters) - (or (cadr (memq :end-of-command parameters)) - "\r\n")) - (provide 'proto-stream) ;;; proto-stream.el ends here From 7a097943f7d3433a5d053eee4b2f3254230fee64 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sun, 27 Mar 2011 09:56:35 +0800 Subject: [PATCH 127/166] Support separate fg and bg colors in ansi-color.el A color suitable for foreground text can make unreadable text if used as background color, and vice versa. --- lisp/ChangeLog | 6 ++++++ lisp/ansi-color.el | 20 ++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f1b53619268..f6d06821062 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-27 Leo Liu + + * ansi-color.el (ansi-color-names-vector): Allow cons cell value + for foreground and background colors. + (ansi-color-make-color-map): Adapt. + 2011-03-25 Leo Liu * midnight.el (midnight-time-float): Remove. Note it calculates diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index 2b43940c1bd..ff7edf40dcb 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el @@ -132,8 +132,18 @@ Parameter Color 37 47 white This vector is used by `ansi-color-make-color-map' to create a color -map. This color map is stored in the variable `ansi-color-map'." - :type '(vector string string string string string string string string) +map. This color map is stored in the variable `ansi-color-map'. + +Each element may also be a cons cell where the car and cdr specify the +foreground and background colors, respectively." + :type '(vector (choice color (cons color color)) + (choice color (cons color color)) + (choice color (cons color color)) + (choice color (cons color color)) + (choice color (cons color color)) + (choice color (cons color color)) + (choice color (cons color color)) + (choice color (cons color color))) :set 'ansi-color-map-update :initialize 'custom-initialize-default :group 'ansi-colors) @@ -528,7 +538,8 @@ The face definitions are based upon the variables (mapc (function (lambda (e) (aset ansi-color-map index - (ansi-color-make-face 'foreground e)) + (ansi-color-make-face 'foreground + (if (consp e) (car e) e))) (setq index (1+ index)) )) ansi-color-names-vector) ;; background attributes @@ -536,7 +547,8 @@ The face definitions are based upon the variables (mapc (function (lambda (e) (aset ansi-color-map index - (ansi-color-make-face 'background e)) + (ansi-color-make-face 'background + (if (consp e) (cdr e) e))) (setq index (1+ index)) )) ansi-color-names-vector) ansi-color-map)) From c5101a77a4066d979698d356c3a9c7f387007359 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 26 Mar 2011 19:12:36 -0700 Subject: [PATCH 128/166] Variadic C functions now count arguments with size_t, not int. --- src/ChangeLog | 19 ++++++++++++ src/alloc.c | 14 ++++----- src/callint.c | 5 +-- src/callproc.c | 14 ++++----- src/character.c | 10 +++--- src/charset.c | 7 +++-- src/coding.c | 18 +++++------ src/data.c | 31 ++++++++++--------- src/dbusbind.c | 51 +++++++++++++++--------------- src/editfns.c | 38 +++++++++++------------ src/eval.c | 82 ++++++++++++++++++++++++++----------------------- src/fns.c | 63 ++++++++++++++++++------------------- src/font.c | 4 +-- src/frame.c | 4 +-- src/lisp.h | 10 +++--- src/process.c | 15 ++++----- src/xdisp.c | 4 +-- 17 files changed, 208 insertions(+), 181 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cf9ca86a798..32f64893ae6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,22 @@ +2011-03-27 Paul Eggert + + Variadic C functions now count arguments with size_t, not int. + This avoids an unnecessary limitation on 64-bit machines, which + caused (substring ...) to crash on large vectors (Bug#8344). + * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int. + (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise. + All variadic functions changed accordingly. + (struct gcpro.nvars): Now size_t, not int. All uses changed. + * data.c (arith_driver, float_arith_driver): Likewise. + * editfns.c (general_insert_function): Likewise. + * eval.c (struct backtrace.nargs, interactive_p) + (internal_condition_case_n, run_hook_with_args, apply_lambda) + (funcall_lambda, mark_backtrace): Likewise. + * fns.c (concat): Likewise. + * frame.c (x_set_frame_parameters): Likewise. + * fns.c (get_key_arg): Now accepts and returns size_t, and returns + 0 if not found, not -1. All callers changed. + 2011-03-26 Paul Eggert * alloc.c (garbage_collect): Don't assume stack size fits in int. diff --git a/src/alloc.c b/src/alloc.c index 00f053e9090..177a2266fb6 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -2707,7 +2707,7 @@ DEFUN ("list", Flist, Slist, 0, MANY, 0, doc: /* Return a newly created list with specified arguments as elements. Any number of arguments, even zero arguments, are allowed. usage: (list &rest OBJECTS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { register Lisp_Object val; val = Qnil; @@ -2923,10 +2923,10 @@ DEFUN ("vector", Fvector, Svector, 0, MANY, 0, doc: /* Return a newly created vector with specified arguments as elements. Any number of arguments, even zero arguments, are allowed. usage: (vector &rest OBJECTS) */) - (register int nargs, Lisp_Object *args) + (register size_t nargs, Lisp_Object *args) { register Lisp_Object len, val; - register int i; + register size_t i; register struct Lisp_Vector *p; XSETFASTINT (len, nargs); @@ -2945,10 +2945,10 @@ stack size, (optional) doc string, and (optional) interactive spec. The first four arguments are required; at most six have any significance. usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INTERACTIVE-SPEC &rest ELEMENTS) */) - (register int nargs, Lisp_Object *args) + (register size_t nargs, Lisp_Object *args) { register Lisp_Object len, val; - register int i; + register size_t i; register struct Lisp_Vector *p; XSETFASTINT (len, nargs); @@ -4230,7 +4230,7 @@ static void check_gcpros (void) { struct gcpro *p; - int i; + size_t i; for (p = gcprolist; p; p = p->next) for (i = 0; i < p->nvars; ++i) @@ -4839,7 +4839,7 @@ returns nil, because real GC can't be done. */) { register struct specbinding *bind; char stack_top_variable; - register int i; + register size_t i; int message_p; Lisp_Object total[8]; int count = SPECPDL_INDEX (); diff --git a/src/callint.c b/src/callint.c index bb815a5bd01..40d89acd16c 100644 --- a/src/callint.c +++ b/src/callint.c @@ -265,8 +265,9 @@ invoke it. If KEYS is omitted or nil, the return value of recorded as a call to the function named callint_argfuns[varies[i]]. */ int *varies; - register int i, j; - int count, foo; + register size_t i, j; + size_t count; + int foo; char prompt1[100]; char *tem1; int arg_from_tty = 0; diff --git a/src/callproc.c b/src/callproc.c index 75f239d1be2..acb7a0e24b1 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -177,7 +177,7 @@ and returns a numeric exit status or a signal description string. If you quit, the process is killed with SIGINT, or SIGKILL if you quit again. usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { Lisp_Object infile, buffer, current_dir, path; volatile int display_p_volatile; @@ -221,7 +221,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) /* Decide the coding-system for giving arguments. */ { Lisp_Object val, *args2; - int i; + size_t i; /* If arguments are supplied, we may have to encode them. */ if (nargs >= 5) @@ -373,10 +373,10 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) path = Fsubstring (path, make_number (2), Qnil); new_argv_volatile = new_argv = (const unsigned char **) - alloca (max (2, nargs - 2) * sizeof (char *)); + alloca ((nargs > 4 ? nargs - 2 : 2) * sizeof (char *)); if (nargs > 4) { - register int i; + register size_t i; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; GCPRO5 (infile, buffer, current_dir, path, error_file); @@ -643,7 +643,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) { if (EQ (coding_systems, Qt)) { - int i; + size_t i; args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); args2[0] = Qcall_process; @@ -864,7 +864,7 @@ and returns a numeric exit status or a signal description string. If you quit, the process is killed with SIGINT, or SIGKILL if you quit again. usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &rest ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { struct gcpro gcpro1; Lisp_Object filename_string; @@ -873,7 +873,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r /* Qt denotes we have not yet called Ffind_operation_coding_system. */ Lisp_Object coding_systems; Lisp_Object val, *args2; - int i; + size_t i; char *tempfile; Lisp_Object tmpdir, pattern; diff --git a/src/character.c b/src/character.c index fdaf22f04f8..c106fc0ba20 100644 --- a/src/character.c +++ b/src/character.c @@ -893,9 +893,10 @@ DEFUN ("string", Fstring, Sstring, 0, MANY, 0, doc: /* Concatenate all the argument characters and make the result a string. usage: (string &rest CHARACTERS) */) - (int n, Lisp_Object *args) + (size_t n, Lisp_Object *args) { - int i, c; + size_t i; + int c; unsigned char *buf, *p; Lisp_Object str; USE_SAFE_ALLOCA; @@ -918,9 +919,10 @@ usage: (string &rest CHARACTERS) */) DEFUN ("unibyte-string", Funibyte_string, Sunibyte_string, 0, MANY, 0, doc: /* Concatenate all the argument bytes and make the result a unibyte string. usage: (unibyte-string &rest BYTES) */) - (int n, Lisp_Object *args) + (size_t n, Lisp_Object *args) { - int i, c; + size_t i; + int c; unsigned char *buf, *p; Lisp_Object str; USE_SAFE_ALLOCA; diff --git a/src/charset.c b/src/charset.c index d82b29ae44b..32836d459f3 100644 --- a/src/charset.c +++ b/src/charset.c @@ -845,7 +845,7 @@ DEFUN ("define-charset-internal", Fdefine_charset_internal, Sdefine_charset_internal, charset_arg_max, MANY, 0, doc: /* For internal use only. usage: (define-charset-internal ...) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { /* Charset attr vector. */ Lisp_Object attrs; @@ -2171,11 +2171,12 @@ DEFUN ("set-charset-priority", Fset_charset_priority, Sset_charset_priority, 1, MANY, 0, doc: /* Assign higher priority to the charsets given as arguments. usage: (set-charset-priority &rest charsets) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { Lisp_Object new_head, old_list, arglist[2]; Lisp_Object list_2022, list_emacs_mule; - int i, id; + size_t i; + int id; old_list = Fcopy_sequence (Vcharset_ordered_list); new_head = Qnil; diff --git a/src/coding.c b/src/coding.c index 0596d16bf46..a93a9a4d0e4 100644 --- a/src/coding.c +++ b/src/coding.c @@ -9300,7 +9300,7 @@ function to call for FILENAME, that function should examine the contents of BUFFER instead of reading the file. usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { Lisp_Object operation, target_idx, target, val; register Lisp_Object chain; @@ -9309,17 +9309,17 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) error ("Too few arguments"); operation = args[0]; if (!SYMBOLP (operation) - || !INTEGERP (target_idx = Fget (operation, Qtarget_idx))) + || !NATNUMP (target_idx = Fget (operation, Qtarget_idx))) error ("Invalid first argument"); - if (nargs < 1 + XINT (target_idx)) + if (nargs < 1 + XFASTINT (target_idx)) error ("Too few arguments for operation: %s", SDATA (SYMBOL_NAME (operation))); - target = args[XINT (target_idx) + 1]; + target = args[XFASTINT (target_idx) + 1]; if (!(STRINGP (target) || (EQ (operation, Qinsert_file_contents) && CONSP (target) && STRINGP (XCAR (target)) && BUFFERP (XCDR (target))) || (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) - error ("Invalid %dth argument", XINT (target_idx) + 1); + error ("Invalid %dth argument", XFASTINT (target_idx) + 1); if (CONSP (target)) target = XCAR (target); @@ -9376,9 +9376,9 @@ If multiple coding systems belong to the same category, all but the first one are ignored. usage: (set-coding-system-priority &rest coding-systems) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { - int i, j; + size_t i, j; int changed[coding_category_max]; enum coding_category priorities[coding_category_max]; @@ -9421,7 +9421,7 @@ usage: (set-coding-system-priority &rest coding-systems) */) /* Update `coding-category-list'. */ Vcoding_category_list = Qnil; - for (i = coding_category_max - 1; i >= 0; i--) + for (i = coding_category_max; i-- > 0; ) Vcoding_category_list = Fcons (AREF (Vcoding_category_table, priorities[i]), Vcoding_category_list); @@ -9482,7 +9482,7 @@ DEFUN ("define-coding-system-internal", Fdefine_coding_system_internal, Sdefine_coding_system_internal, coding_arg_max, MANY, 0, doc: /* For internal use only. usage: (define-coding-system-internal ...) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { Lisp_Object name; Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */ diff --git a/src/data.c b/src/data.c index 01aafbcede4..0a5ce52c95f 100644 --- a/src/data.c +++ b/src/data.c @@ -2474,13 +2474,13 @@ enum arithop Amin }; -static Lisp_Object float_arith_driver (double, int, enum arithop, - int, Lisp_Object *); +static Lisp_Object float_arith_driver (double, size_t, enum arithop, + size_t, Lisp_Object *); static Lisp_Object -arith_driver (enum arithop code, int nargs, register Lisp_Object *args) +arith_driver (enum arithop code, size_t nargs, register Lisp_Object *args) { register Lisp_Object val; - register int argnum; + register size_t argnum; register EMACS_INT accum = 0; register EMACS_INT next; @@ -2562,7 +2562,8 @@ arith_driver (enum arithop code, int nargs, register Lisp_Object *args) #define isnan(x) ((x) != (x)) static Lisp_Object -float_arith_driver (double accum, register int argnum, enum arithop code, int nargs, register Lisp_Object *args) +float_arith_driver (double accum, register size_t argnum, enum arithop code, + size_t nargs, register Lisp_Object *args) { register Lisp_Object val; double next; @@ -2624,7 +2625,7 @@ float_arith_driver (double accum, register int argnum, enum arithop code, int na DEFUN ("+", Fplus, Splus, 0, MANY, 0, doc: /* Return sum of any number of arguments, which are numbers or markers. usage: (+ &rest NUMBERS-OR-MARKERS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return arith_driver (Aadd, nargs, args); } @@ -2634,7 +2635,7 @@ DEFUN ("-", Fminus, Sminus, 0, MANY, 0, With one arg, negates it. With more than one arg, subtracts all but the first from the first. usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return arith_driver (Asub, nargs, args); } @@ -2642,7 +2643,7 @@ usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, doc: /* Return product of any number of arguments, which are numbers or markers. usage: (* &rest NUMBERS-OR-MARKERS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return arith_driver (Amult, nargs, args); } @@ -2651,9 +2652,9 @@ DEFUN ("/", Fquo, Squo, 2, MANY, 0, doc: /* Return first argument divided by all the remaining arguments. The arguments must be numbers or markers. usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { - int argnum; + size_t argnum; for (argnum = 2; argnum < nargs; argnum++) if (FLOATP (args[argnum])) return float_arith_driver (0, 0, Adiv, nargs, args); @@ -2735,7 +2736,7 @@ DEFUN ("max", Fmax, Smax, 1, MANY, 0, doc: /* Return largest of all the arguments (which must be numbers or markers). The value is always a number; markers are converted to numbers. usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return arith_driver (Amax, nargs, args); } @@ -2744,7 +2745,7 @@ DEFUN ("min", Fmin, Smin, 1, MANY, 0, doc: /* Return smallest of all the arguments (which must be numbers or markers). The value is always a number; markers are converted to numbers. usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return arith_driver (Amin, nargs, args); } @@ -2753,7 +2754,7 @@ DEFUN ("logand", Flogand, Slogand, 0, MANY, 0, doc: /* Return bitwise-and of all the arguments. Arguments may be integers, or markers converted to integers. usage: (logand &rest INTS-OR-MARKERS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return arith_driver (Alogand, nargs, args); } @@ -2762,7 +2763,7 @@ DEFUN ("logior", Flogior, Slogior, 0, MANY, 0, doc: /* Return bitwise-or of all the arguments. Arguments may be integers, or markers converted to integers. usage: (logior &rest INTS-OR-MARKERS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return arith_driver (Alogior, nargs, args); } @@ -2771,7 +2772,7 @@ DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0, doc: /* Return bitwise-exclusive-or of all the arguments. Arguments may be integers, or markers converted to integers. usage: (logxor &rest INTS-OR-MARKERS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return arith_driver (Alogxor, nargs, args); } diff --git a/src/dbusbind.c b/src/dbusbind.c index 2c8de20a4d4..8a6870555d0 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -1051,7 +1051,7 @@ object is returned instead of a list containing this single Lisp object. => "i686" usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TIMEOUT &rest ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { Lisp_Object bus, service, path, interface, method; Lisp_Object result; @@ -1063,7 +1063,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI DBusError derror; unsigned int dtype; int timeout = -1; - int i = 5; + size_t i = 5; char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; /* Check parameters. */ @@ -1116,7 +1116,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI { XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); - XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-4, + XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-4), SDATA (format2 ("%s", args[i], Qnil)), SDATA (format2 ("%s", args[i+1], Qnil))); ++i; @@ -1124,7 +1124,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI else { XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); - XD_DEBUG_MESSAGE ("Parameter%d %s", i-4, + XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i-4), SDATA (format2 ("%s", args[i], Qnil))); } @@ -1233,7 +1233,7 @@ Example: -| i686 usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLER &optional :timeout TIMEOUT &rest ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { Lisp_Object bus, service, path, interface, method, handler; Lisp_Object result; @@ -1243,7 +1243,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE DBusMessageIter iter; unsigned int dtype; int timeout = -1; - int i = 6; + size_t i = 6; char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; /* Check parameters. */ @@ -1298,7 +1298,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE { XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); - XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-4, + XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-4), SDATA (format2 ("%s", args[i], Qnil)), SDATA (format2 ("%s", args[i+1], Qnil))); ++i; @@ -1306,7 +1306,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE else { XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); - XD_DEBUG_MESSAGE ("Parameter%d %s", i-4, + XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i - 4), SDATA (format2 ("%s", args[i], Qnil))); } @@ -1357,7 +1357,7 @@ DEFUN ("dbus-method-return-internal", Fdbus_method_return_internal, This is an internal function, it shall not be used outside dbus.el. usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { Lisp_Object bus, serial, service; struct gcpro gcpro1, gcpro2, gcpro3; @@ -1365,7 +1365,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) DBusMessage *dmessage; DBusMessageIter iter; unsigned int dtype; - int i; + size_t i; char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; /* Check parameters. */ @@ -1405,7 +1405,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) { XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); - XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-2, + XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-2), SDATA (format2 ("%s", args[i], Qnil)), SDATA (format2 ("%s", args[i+1], Qnil))); ++i; @@ -1413,7 +1413,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) else { XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); - XD_DEBUG_MESSAGE ("Parameter%d %s", i-2, + XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i-2), SDATA (format2 ("%s", args[i], Qnil))); } @@ -1445,7 +1445,7 @@ DEFUN ("dbus-method-error-internal", Fdbus_method_error_internal, This is an internal function, it shall not be used outside dbus.el. usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { Lisp_Object bus, serial, service; struct gcpro gcpro1, gcpro2, gcpro3; @@ -1453,7 +1453,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) DBusMessage *dmessage; DBusMessageIter iter; unsigned int dtype; - int i; + size_t i; char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; /* Check parameters. */ @@ -1494,7 +1494,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) { XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); - XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-2, + XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-2), SDATA (format2 ("%s", args[i], Qnil)), SDATA (format2 ("%s", args[i+1], Qnil))); ++i; @@ -1502,7 +1502,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) else { XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); - XD_DEBUG_MESSAGE ("Parameter%d %s", i-2, + XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i-2), SDATA (format2 ("%s", args[i], Qnil))); } @@ -1557,7 +1557,7 @@ Example: "org.gnu.Emacs.FileManager" "FileModified" "/home/albinus/.emacs") usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { Lisp_Object bus, service, path, interface, signal; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; @@ -1565,7 +1565,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) DBusMessage *dmessage; DBusMessageIter iter; unsigned int dtype; - int i; + size_t i; char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; /* Check parameters. */ @@ -1609,7 +1609,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) { XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); - XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-4, + XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-4), SDATA (format2 ("%s", args[i], Qnil)), SDATA (format2 ("%s", args[i+1], Qnil))); ++i; @@ -1617,7 +1617,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) else { XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); - XD_DEBUG_MESSAGE ("Parameter%d %s", i-4, + XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i-4), SDATA (format2 ("%s", args[i], Qnil))); } @@ -1885,11 +1885,11 @@ Example: => :already-owner. usage: (dbus-register-service BUS SERVICE &rest FLAGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { Lisp_Object bus, service; DBusConnection *connection; - unsigned int i; + size_t i; unsigned int value; unsigned int flags = 0; int result; @@ -1985,13 +1985,13 @@ INTERFACE, SIGNAL and HANDLER must not be nil. Example: `dbus-unregister-object' for removing the registration. usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { Lisp_Object bus, service, path, interface, signal, handler; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; Lisp_Object uname, key, key1, value; DBusConnection *connection; - int i; + size_t i; char rule[DBUS_MAXIMUM_MATCH_RULE_LENGTH]; char x[DBUS_MAXIMUM_MATCH_RULE_LENGTH]; DBusError derror; @@ -2061,7 +2061,8 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG if (!NILP (args[i])) { CHECK_STRING (args[i]); - sprintf (x, ",arg%d='%s'", i-6, SDATA (args[i])); + sprintf (x, ",arg%lu='%s'", (unsigned long) (i-6), + SDATA (args[i])); strcat (rule, x); } diff --git a/src/editfns.c b/src/editfns.c index 009e1d34bde..99832db1b4c 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -101,7 +101,7 @@ static void general_insert_function (void (*) (const char *, EMACS_INT), void (*) (Lisp_Object, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, int), - int, int, Lisp_Object *); + int, size_t, Lisp_Object *); static Lisp_Object subst_char_in_region_unwind (Lisp_Object); static Lisp_Object subst_char_in_region_unwind_1 (Lisp_Object); static void transpose_markers (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, @@ -1871,7 +1871,7 @@ Years before 1970 are not guaranteed to work. On some systems, year values as low as 1901 do work. usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { time_t value; struct tm tm; @@ -2207,9 +2207,9 @@ general_insert_function (void (*insert_func) void (*insert_from_string_func) (Lisp_Object, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, int), - int inherit, int nargs, Lisp_Object *args) + int inherit, size_t nargs, Lisp_Object *args) { - register int argnum; + register size_t argnum; register Lisp_Object val; for (argnum = 0; argnum < nargs; argnum++) @@ -2272,7 +2272,7 @@ buffer; to accomplish this, apply `string-as-multibyte' to the string and insert the result. usage: (insert &rest ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { general_insert_function (insert, insert_from_string, 0, nargs, args); return Qnil; @@ -2291,7 +2291,7 @@ If the current buffer is unibyte, multibyte strings are converted to unibyte for insertion. usage: (insert-and-inherit &rest ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { general_insert_function (insert_and_inherit, insert_from_string, 1, nargs, args); @@ -2308,7 +2308,7 @@ If the current buffer is unibyte, multibyte strings are converted to unibyte for insertion. usage: (insert-before-markers &rest ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { general_insert_function (insert_before_markers, insert_from_string_before_markers, 0, @@ -2327,7 +2327,7 @@ If the current buffer is unibyte, multibyte strings are converted to unibyte for insertion. usage: (insert-before-markers-and-inherit &rest ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { general_insert_function (insert_before_markers_and_inherit, insert_from_string_before_markers, 1, @@ -3399,7 +3399,7 @@ any existing message; this lets the minibuffer contents show. See also `current-message'. usage: (message FORMAT-STRING &rest ARGS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { if (NILP (args[0]) || (STRINGP (args[0]) @@ -3427,7 +3427,7 @@ If the first argument is nil or the empty string, clear any existing message; let the minibuffer contents show. usage: (message-box FORMAT-STRING &rest ARGS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { if (NILP (args[0])) { @@ -3484,7 +3484,7 @@ If the first argument is nil or the empty string, clear any existing message; let the minibuffer contents show. usage: (message-or-box FORMAT-STRING &rest ARGS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { #ifdef HAVE_MENUS if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) @@ -3508,14 +3508,14 @@ First argument is the string to copy. Remaining arguments form a sequence of PROPERTY VALUE pairs for text properties to add to the result. usage: (propertize STRING &rest PROPERTIES) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { Lisp_Object properties, string; struct gcpro gcpro1, gcpro2; - int i; + size_t i; /* Number of args must be odd. */ - if ((nargs & 1) == 0 || nargs < 1) + if ((nargs & 1) == 0) error ("Wrong number of arguments"); properties = string = Qnil; @@ -3590,10 +3590,10 @@ decimal point itself is omitted. For %s and %S, the precision specifier truncates the string to the given width. usage: (format STRING &rest OBJECTS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { - register int n; /* The number of the next arg to substitute */ - register EMACS_INT total; /* An estimate of the final length */ + register size_t n; /* The number of the next arg to substitute */ + register size_t total; /* An estimate of the final length */ char *buf, *p; register char *format, *end, *format_start; int nchars; @@ -3669,8 +3669,8 @@ usage: (format STRING &rest OBJECTS) */) /* Allocate the info and discarded tables. */ { - int nbytes = (nargs+1) * sizeof *info; - int i; + size_t nbytes = (nargs+1) * sizeof *info; + size_t i; if (!info) info = (struct info *) alloca (nbytes); memset (info, 0, nbytes); diff --git a/src/eval.c b/src/eval.c index f68274e6e8c..b9d9354f48a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -38,9 +38,9 @@ struct backtrace struct backtrace *next; Lisp_Object *function; Lisp_Object *args; /* Points to vector of args. */ - int nargs; /* Length of vector. - If nargs is UNEVALLED, args points to slot holding - list of unevalled args */ + size_t nargs; /* Length of vector. + If nargs is (size_t) UNEVALLED, args points + to slot holding list of unevalled args */ char evalargs; /* Nonzero means call value of debugger when done with this operation. */ char debug_on_exit; @@ -111,7 +111,7 @@ Lisp_Object Vsignaling_function; int handling_signal; -static Lisp_Object funcall_lambda (Lisp_Object, int, Lisp_Object*); +static Lisp_Object funcall_lambda (Lisp_Object, size_t, Lisp_Object*); static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; static int interactive_p (int); static Lisp_Object apply_lambda (Lisp_Object, Lisp_Object, int); @@ -553,7 +553,7 @@ interactive_p (int exclude_subrs_p) looking at several frames for special forms. Skip past them. */ while (btp && (EQ (*btp->function, Qbytecode) - || btp->nargs == UNEVALLED)) + || btp->nargs == (size_t) UNEVALLED)) btp = btp->next; /* btp now points at the frame of the innermost function that isn't @@ -959,7 +959,7 @@ usage: (let VARLIST BODY...) */) Lisp_Object *temps, tem; register Lisp_Object elt, varlist; int count = SPECPDL_INDEX (); - register int argnum; + register size_t argnum; struct gcpro gcpro1, gcpro2; USE_SAFE_ALLOCA; @@ -1511,8 +1511,8 @@ internal_condition_case_2 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object), and ARGS as second argument. */ Lisp_Object -internal_condition_case_n (Lisp_Object (*bfun) (int, Lisp_Object*), - int nargs, +internal_condition_case_n (Lisp_Object (*bfun) (size_t, Lisp_Object *), + size_t nargs, Lisp_Object *args, Lisp_Object handlers, Lisp_Object (*hfun) (Lisp_Object)) @@ -2203,7 +2203,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, { /* Pass a vector of evaluated arguments */ Lisp_Object *vals; - register int argnum = 0; + register size_t argnum = 0; USE_SAFE_ALLOCA; SAFE_ALLOCA_LISP (vals, XINT (numargs)); @@ -2332,9 +2332,9 @@ DEFUN ("apply", Fapply, Sapply, 2, MANY, 0, Then return the value FUNCTION returns. Thus, (apply '+ 1 2 '(3 4)) returns 10. usage: (apply FUNCTION &rest ARGUMENTS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { - register int i, numargs; + register size_t i, numargs; register Lisp_Object spread_arg; register Lisp_Object *funcall_args; Lisp_Object fun, retval; @@ -2374,7 +2374,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) if (numargs < XSUBR (fun)->min_args || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs)) goto funcall; /* Let funcall get the error */ - else if (XSUBR (fun)->max_args > numargs) + else if (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args > numargs) { /* Avoid making funcall cons up a yet another new vector of arguments by explicitly supplying nil's for optional values */ @@ -2416,7 +2416,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) /* Run hook variables in various ways. */ enum run_hooks_condition {to_completion, until_success, until_failure}; -static Lisp_Object run_hook_with_args (int, Lisp_Object *, +static Lisp_Object run_hook_with_args (size_t, Lisp_Object *, enum run_hooks_condition); DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, @@ -2434,10 +2434,10 @@ hook; they should use `run-mode-hooks' instead. Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. usage: (run-hooks &rest HOOKS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { Lisp_Object hook[1]; - register int i; + register size_t i; for (i = 0; i < nargs; i++) { @@ -2463,7 +2463,7 @@ as that may change. Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. usage: (run-hook-with-args HOOK &rest ARGS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return run_hook_with_args (nargs, args, to_completion); } @@ -2483,7 +2483,7 @@ However, if they all return nil, we return nil. Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. usage: (run-hook-with-args-until-success HOOK &rest ARGS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return run_hook_with_args (nargs, args, until_success); } @@ -2502,7 +2502,7 @@ Then we return nil. However, if they all return non-nil, we return non-nil. Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return run_hook_with_args (nargs, args, until_failure); } @@ -2516,7 +2516,8 @@ usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */) except that it isn't necessary to gcpro ARGS[0]. */ static Lisp_Object -run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) +run_hook_with_args (size_t nargs, Lisp_Object *args, + enum run_hooks_condition cond) { Lisp_Object sym, val, ret; struct gcpro gcpro1, gcpro2, gcpro3; @@ -2763,16 +2764,16 @@ DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0, Return the value that function returns. Thus, (funcall 'cons 'x 'y) returns (x . y). usage: (funcall FUNCTION &rest ARGUMENTS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { Lisp_Object fun, original_fun; Lisp_Object funcar; - int numargs = nargs - 1; + size_t numargs = nargs - 1; Lisp_Object lisp_numargs; Lisp_Object val; struct backtrace backtrace; register Lisp_Object *internal_args; - register int i; + register size_t i; QUIT; if ((consing_since_gc > gc_cons_threshold @@ -2925,21 +2926,21 @@ static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args, int eval_flag) { Lisp_Object args_left; - Lisp_Object numargs; + size_t numargs; register Lisp_Object *arg_vector; struct gcpro gcpro1, gcpro2, gcpro3; - register int i; + register size_t i; register Lisp_Object tem; USE_SAFE_ALLOCA; - numargs = Flength (args); - SAFE_ALLOCA_LISP (arg_vector, XINT (numargs)); + numargs = XINT (Flength (args)); + SAFE_ALLOCA_LISP (arg_vector, numargs); args_left = args; GCPRO3 (*arg_vector, args_left, fun); gcpro1.nvars = 0; - for (i = 0; i < XINT (numargs);) + for (i = 0; i < numargs; ) { tem = Fcar (args_left), args_left = Fcdr (args_left); if (eval_flag) tem = Feval (tem); @@ -2955,7 +2956,7 @@ apply_lambda (Lisp_Object fun, Lisp_Object args, int eval_flag) backtrace_list->nargs = i; } backtrace_list->evalargs = 0; - tem = funcall_lambda (fun, XINT (numargs), arg_vector); + tem = funcall_lambda (fun, numargs, arg_vector); /* Do the debug-on-exit now, while arg_vector still exists. */ if (backtrace_list->debug_on_exit) @@ -2971,11 +2972,13 @@ apply_lambda (Lisp_Object fun, Lisp_Object args, int eval_flag) FUN must be either a lambda-expression or a compiled-code object. */ static Lisp_Object -funcall_lambda (Lisp_Object fun, int nargs, register Lisp_Object *arg_vector) +funcall_lambda (Lisp_Object fun, size_t nargs, + register Lisp_Object *arg_vector) { Lisp_Object val, syms_left, next; int count = SPECPDL_INDEX (); - int i, optional, rest; + size_t i; + int optional, rest; if (CONSP (fun)) { @@ -3310,7 +3313,7 @@ Output stream used is value of `standard-output'. */) while (backlist) { write_string (backlist->debug_on_exit ? "* " : " ", 2); - if (backlist->nargs == UNEVALLED) + if (backlist->nargs == (size_t) UNEVALLED) { Fprin1 (Fcons (*backlist->function, *backlist->args), Qnil); write_string ("\n", -1); @@ -3320,7 +3323,7 @@ Output stream used is value of `standard-output'. */) tem = *backlist->function; Fprin1 (tem, Qnil); /* This can QUIT */ write_string ("(", -1); - if (backlist->nargs == MANY) + if (backlist->nargs == (size_t) MANY) { for (tail = *backlist->args, i = 0; !NILP (tail); @@ -3372,11 +3375,11 @@ If NFRAMES is more than the number of frames, the value is nil. */) if (!backlist) return Qnil; - if (backlist->nargs == UNEVALLED) + if (backlist->nargs == (size_t) UNEVALLED) return Fcons (Qnil, Fcons (*backlist->function, *backlist->args)); else { - if (backlist->nargs == MANY) + if (backlist->nargs == (size_t) MANY) tem = *backlist->args; else tem = Flist (backlist->nargs, backlist->args); @@ -3390,17 +3393,18 @@ void mark_backtrace (void) { register struct backtrace *backlist; - register int i; + register size_t i; for (backlist = backtrace_list; backlist; backlist = backlist->next) { mark_object (*backlist->function); - if (backlist->nargs == UNEVALLED || backlist->nargs == MANY) - i = 0; + if (backlist->nargs == (size_t) UNEVALLED + || backlist->nargs == (size_t) MANY) + i = 1; else - i = backlist->nargs - 1; - for (; i >= 0; i--) + i = backlist->nargs; + while (i--) mark_object (backlist->args[i]); } } diff --git a/src/fns.c b/src/fns.c index 71f49b9cdae..95e8badbaa5 100644 --- a/src/fns.c +++ b/src/fns.c @@ -348,7 +348,7 @@ Symbols are also allowed; their print names are used instead. */) return i1 < SCHARS (s2) ? Qt : Qnil; } -static Lisp_Object concat (int nargs, Lisp_Object *args, +static Lisp_Object concat (size_t nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special); /* ARGSUSED */ @@ -378,7 +378,7 @@ The result is a list whose elements are the elements of all the arguments. Each argument may be a list, vector or string. The last argument is not copied, just used as the tail of the new list. usage: (append &rest SEQUENCES) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return concat (nargs, args, Lisp_Cons, 1); } @@ -388,7 +388,7 @@ DEFUN ("concat", Fconcat, Sconcat, 0, MANY, 0, The result is a string whose elements are the elements of all the arguments. Each argument may be a string or a list or vector of characters (integers). usage: (concat &rest SEQUENCES) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return concat (nargs, args, Lisp_String, 0); } @@ -398,7 +398,7 @@ DEFUN ("vconcat", Fvconcat, Svconcat, 0, MANY, 0, The result is a vector whose elements are the elements of all the arguments. Each argument may be a list, vector or string. usage: (vconcat &rest SEQUENCES) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { return concat (nargs, args, Lisp_Vectorlike, 0); } @@ -446,7 +446,8 @@ struct textprop_rec }; static Lisp_Object -concat (int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special) +concat (size_t nargs, Lisp_Object *args, + enum Lisp_Type target_type, int last_special) { Lisp_Object val; register Lisp_Object tail; @@ -455,7 +456,7 @@ concat (int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_speci EMACS_INT toindex_byte = 0; register EMACS_INT result_len; register EMACS_INT result_len_byte; - register int argnum; + register size_t argnum; Lisp_Object last_tail; Lisp_Object prev; int some_multibyte; @@ -2232,9 +2233,9 @@ DEFUN ("nconc", Fnconc, Snconc, 0, MANY, 0, doc: /* Concatenate any number of lists by altering them. Only the last argument is not altered, and need not be a list. usage: (nconc &rest LISTS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { - register int argnum; + register size_t argnum; register Lisp_Object tail, tem, val; val = tail = Qnil; @@ -2763,7 +2764,7 @@ DEFUN ("widget-apply", Fwidget_apply, Swidget_apply, 2, MANY, 0, doc: /* Apply the value of WIDGET's PROPERTY to the widget itself. ARGS are passed as extra arguments to the function. usage: (widget-apply WIDGET PROPERTY &rest ARGS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { /* This function can GC. */ Lisp_Object newargs[3]; @@ -3367,7 +3368,7 @@ Lisp_Object Qhash_table_test, Qkey_or_value, Qkey_and_value; /* Function prototypes. */ static struct Lisp_Hash_Table *check_hash_table (Lisp_Object); -static int get_key_arg (Lisp_Object, int, Lisp_Object *, char *); +static size_t get_key_arg (Lisp_Object, size_t, Lisp_Object *, char *); static void maybe_resize_hash_table (struct Lisp_Hash_Table *); static int cmpfn_eql (struct Lisp_Hash_Table *, Lisp_Object, unsigned, Lisp_Object, unsigned); @@ -3422,27 +3423,23 @@ next_almost_prime (int n) /* Find KEY in ARGS which has size NARGS. Don't consider indices for which USED[I] is non-zero. If found at index I in ARGS, set USED[I] and USED[I + 1] to 1, and return I + 1. Otherwise return - -1. This function is used to extract a keyword/argument pair from + 0. This function is used to extract a keyword/argument pair from a DEFUN parameter list. */ -static int -get_key_arg (Lisp_Object key, int nargs, Lisp_Object *args, char *used) +static size_t +get_key_arg (Lisp_Object key, size_t nargs, Lisp_Object *args, char *used) { - int i; + size_t i; - for (i = 0; i < nargs - 1; ++i) - if (!used[i] && EQ (args[i], key)) - break; + for (i = 1; i < nargs; i++) + if (!used[i - 1] && EQ (args[i - 1], key)) + { + used[i - 1] = 1; + used[i] = 1; + return i; + } - if (i >= nargs - 1) - i = -1; - else - { - used[i++] = 1; - used[i] = 1; - } - - return i; + return 0; } @@ -4290,12 +4287,12 @@ WEAK. WEAK t is equivalent to `key-and-value'. Default value of WEAK is nil. usage: (make-hash-table &rest KEYWORD-ARGS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { Lisp_Object test, size, rehash_size, rehash_threshold, weak; Lisp_Object user_test, user_hash; char *used; - int i; + size_t i; /* The vector `used' is used to keep track of arguments that have been consumed. */ @@ -4304,7 +4301,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) /* See if there's a `:test TEST' among the arguments. */ i = get_key_arg (QCtest, nargs, args, used); - test = i < 0 ? Qeql : args[i]; + test = i ? args[i] : Qeql; if (!EQ (test, Qeq) && !EQ (test, Qeql) && !EQ (test, Qequal)) { /* See if it is a user-defined test. */ @@ -4321,7 +4318,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) /* See if there's a `:size SIZE' argument. */ i = get_key_arg (QCsize, nargs, args, used); - size = i < 0 ? Qnil : args[i]; + size = i ? args[i] : Qnil; if (NILP (size)) size = make_number (DEFAULT_HASH_SIZE); else if (!INTEGERP (size) || XINT (size) < 0) @@ -4329,7 +4326,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) /* Look for `:rehash-size SIZE'. */ i = get_key_arg (QCrehash_size, nargs, args, used); - rehash_size = i < 0 ? make_float (DEFAULT_REHASH_SIZE) : args[i]; + rehash_size = i ? args[i] : make_float (DEFAULT_REHASH_SIZE); if (!NUMBERP (rehash_size) || (INTEGERP (rehash_size) && XINT (rehash_size) <= 0) || XFLOATINT (rehash_size) <= 1.0) @@ -4337,7 +4334,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) /* Look for `:rehash-threshold THRESHOLD'. */ i = get_key_arg (QCrehash_threshold, nargs, args, used); - rehash_threshold = i < 0 ? make_float (DEFAULT_REHASH_THRESHOLD) : args[i]; + rehash_threshold = i ? args[i] : make_float (DEFAULT_REHASH_THRESHOLD); if (!FLOATP (rehash_threshold) || XFLOATINT (rehash_threshold) <= 0.0 || XFLOATINT (rehash_threshold) > 1.0) @@ -4345,7 +4342,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) /* Look for `:weakness WEAK'. */ i = get_key_arg (QCweakness, nargs, args, used); - weak = i < 0 ? Qnil : args[i]; + weak = i ? args[i] : Qnil; if (EQ (weak, Qt)) weak = Qkey_and_value; if (!NILP (weak) diff --git a/src/font.c b/src/font.c index 9e8b7029c22..6b2e2f2712d 100644 --- a/src/font.c +++ b/src/font.c @@ -3831,10 +3831,10 @@ be an OpenType font, and whose GPOS table of `thai' script's default language system must contain `mark' feature. usage: (font-spec ARGS...) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { Lisp_Object spec = font_make_spec (); - int i; + size_t i; for (i = 0; i < nargs; i += 2) { diff --git a/src/frame.c b/src/frame.c index cdcb313280b..1b6d36092ae 100644 --- a/src/frame.c +++ b/src/frame.c @@ -2902,7 +2902,7 @@ x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist) /* Record in these vectors all the parms specified. */ Lisp_Object *parms; Lisp_Object *values; - int i, p; + size_t i, p; int left_no_change = 0, top_no_change = 0; int icon_left_no_change = 0, icon_top_no_change = 0; int size_changed = 0; @@ -2975,7 +2975,7 @@ x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist) } /* Now process them in reverse of specified order. */ - for (i--; i >= 0; i--) + while (i-- != 0) { Lisp_Object prop, val; diff --git a/src/lisp.h b/src/lisp.h index e98172ec104..e8d77c83a79 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -964,7 +964,7 @@ struct Lisp_Subr Lisp_Object (*a7) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); Lisp_Object (*a8) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); Lisp_Object (*aUNEVALLED) (Lisp_Object args); - Lisp_Object (*aMANY) (int, Lisp_Object *); + Lisp_Object (*aMANY) (size_t, Lisp_Object *); } function; short min_args, max_args; const char *symbol_name; @@ -1809,7 +1809,7 @@ typedef struct { /* Note that the weird token-substitution semantics of ANSI C makes this work for MANY and UNEVALLED. */ -#define DEFUN_ARGS_MANY (int, Lisp_Object *) +#define DEFUN_ARGS_MANY (size_t, Lisp_Object *) #define DEFUN_ARGS_UNEVALLED (Lisp_Object) #define DEFUN_ARGS_0 (void) #define DEFUN_ARGS_1 (Lisp_Object) @@ -2079,7 +2079,7 @@ struct gcpro volatile Lisp_Object *var; /* Number of consecutive protected variables. */ - int nvars; + size_t nvars; #ifdef DEBUG_GCPRO int level; @@ -2860,7 +2860,7 @@ extern Lisp_Object internal_lisp_condition_case (Lisp_Object, Lisp_Object, Lisp_ extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object)); extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); -extern Lisp_Object internal_condition_case_n (Lisp_Object (*) (int, Lisp_Object *), int, Lisp_Object *, Lisp_Object, Lisp_Object (*) (Lisp_Object)); +extern Lisp_Object internal_condition_case_n (Lisp_Object (*) (size_t, Lisp_Object *), size_t, Lisp_Object *, Lisp_Object, Lisp_Object (*) (Lisp_Object)); extern void specbind (Lisp_Object, Lisp_Object); extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); extern Lisp_Object unbind_to (int, Lisp_Object); @@ -2870,7 +2870,7 @@ extern void do_autoload (Lisp_Object, Lisp_Object); extern Lisp_Object un_autoload (Lisp_Object); EXFUN (Ffetch_bytecode, 1); extern void init_eval_once (void); -extern Lisp_Object safe_call (int, Lisp_Object *); +extern Lisp_Object safe_call (size_t, Lisp_Object *); extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object); extern void init_eval (void); diff --git a/src/process.c b/src/process.c index 639b6a49fce..ecda8e08012 100644 --- a/src/process.c +++ b/src/process.c @@ -1512,11 +1512,11 @@ the command through a shell and redirect one of them using the shell syntax. usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) - (int nargs, register Lisp_Object *args) + (size_t nargs, register Lisp_Object *args) { Lisp_Object buffer, name, program, proc, current_dir, tem; register unsigned char **new_argv; - register int i; + register size_t i; int count = SPECPDL_INDEX (); buffer = args[1]; @@ -1722,7 +1722,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *)); new_argv[nargs - 2] = 0; - for (i = nargs - 3; i >= 0; i--) + for (i = nargs - 2; i-- != 0; ) { new_argv[i] = SDATA (XCAR (tem)); tem = XCDR (tem); @@ -2681,7 +2681,7 @@ Examples: \(serial-process-configure :port "\\\\.\\COM13" :bytesize 7) usage: (serial-process-configure &rest ARGS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { struct Lisp_Process *p; Lisp_Object contact = Qnil; @@ -2799,7 +2799,7 @@ Examples: \(make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil) usage: (make-serial-process &rest ARGS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { int fd = -1; Lisp_Object proc, contact, port; @@ -3077,7 +3077,7 @@ The original argument list, modified with the actual connection information, is available via the `process-contact' function. usage: (make-network-process &rest ARGS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { Lisp_Object proc; Lisp_Object contact; @@ -3393,7 +3393,8 @@ usage: (make-network-process &rest ARGS) */) for (lres = res; lres; lres = lres->ai_next) { - int optn, optbits; + size_t optn; + int optbits; #ifdef WINDOWSNT retry_connect: diff --git a/src/xdisp.c b/src/xdisp.c index cc5d61abdb2..4b196645720 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2181,7 +2181,7 @@ safe_eval_handler (Lisp_Object arg) redisplay during the evaluation. */ Lisp_Object -safe_call (int nargs, Lisp_Object *args) +safe_call (size_t nargs, Lisp_Object *args) { Lisp_Object val; @@ -16389,7 +16389,7 @@ With ARG, turn tracing on if and only if ARG is positive. */) DEFUN ("trace-to-stderr", Ftrace_to_stderr, Strace_to_stderr, 1, MANY, "", doc: /* Like `format', but print result to stderr. usage: (trace-to-stderr STRING &rest OBJECTS) */) - (int nargs, Lisp_Object *args) + (size_t nargs, Lisp_Object *args) { Lisp_Object s = Fformat (nargs, args); fprintf (stderr, "%s", SDATA (s)); From ffa8c828c6c76d3c246443a6752f1038eab60413 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 26 Mar 2011 19:20:34 -0700 Subject: [PATCH 129/166] * keyboard.c, keyboard.h (num_input_events): Now size_t. This avoids undefined behavior on integer overflow, and is a bit more convenient anyway since it is compared to a size_t variable. --- src/ChangeLog | 4 ++++ src/keyboard.c | 4 ++-- src/keyboard.h | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 32f64893ae6..93c43b85184 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-27 Paul Eggert + * keyboard.c, keyboard.h (num_input_events): Now size_t. + This avoids undefined behavior on integer overflow, and is a bit + more convenient anyway since it is compared to a size_t variable. + Variadic C functions now count arguments with size_t, not int. This avoids an unnecessary limitation on 64-bit machines, which caused (substring ...) to crash on large vectors (Bug#8344). diff --git a/src/keyboard.c b/src/keyboard.c index c4ef2795f6a..09a0010cedc 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -201,8 +201,8 @@ Lisp_Object unread_switch_frame; /* Last size recorded for a current buffer which is not a minibuffer. */ static EMACS_INT last_non_minibuf_size; -/* Total number of times read_char has returned. */ -int num_input_events; +/* Total number of times read_char has returned, modulo SIZE_MAX + 1. */ +size_t num_input_events; /* Value of num_nonmacro_input_events as of last auto save. */ diff --git a/src/keyboard.h b/src/keyboard.h index ba3c909c4dd..31215199f14 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -194,8 +194,8 @@ extern KBOARD *all_kboards; /* Nonzero in the single-kboard state, 0 in the any-kboard state. */ extern int single_kboard; -/* Total number of times read_char has returned. */ -extern int num_input_events; +/* Total number of times read_char has returned, modulo SIZE_MAX + 1. */ +extern size_t num_input_events; /* Nonzero means polling for input is temporarily suppressed. */ extern int poll_suppress_count; From 9af30bdf17f8371664bc0c5854c91c2e46257b5e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 26 Mar 2011 19:27:11 -0700 Subject: [PATCH 130/166] Remove (RET)SIGTYPE; it is identical to void on all supported systems. Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg01068.html * configure.in (AC_TYPE_SIGNAL): Remove obsolete macro. (AH_BOTTOM): Do not define SIGTYPE. * lib-src/emacsclient.c: Replace SIGTYPE with void. * nt/config.nt: Remove RETSIGTYPE, SIGTYPE (identical to void). * src/syssignal.h: Replace RETSIGTYPE with void. * src/atimer.c, src/data.c, src/dispnew.c, src/emacs.c, src/floatfns.c: * src/keyboard.c, src/keyboard.h, src/lisp.h, src/process.c, src/sysdep.c: * src/xterm.c: Replace SIGTYPE with void everywhere. * src/s/template.h (SIGTYPE): Remove commented out definition. * src/s/usg5-4-common.h (SIGTYPE): Remove definition. * admin/CPP-DEFINES: Remove SIGTYPE. --- ChangeLog | 5 +++++ admin/CPP-DEFINES | 2 -- configure.in | 8 -------- lib-src/ChangeLog | 4 ++++ lib-src/emacsclient.c | 6 +++--- nt/ChangeLog | 4 ++++ nt/config.nt | 9 --------- src/ChangeLog | 9 +++++++++ src/atimer.c | 4 ++-- src/data.c | 2 +- src/dispnew.c | 2 +- src/emacs.c | 4 ++-- src/floatfns.c | 6 +++--- src/keyboard.c | 12 ++++++------ src/keyboard.h | 2 +- src/lisp.h | 2 +- src/process.c | 8 ++++---- src/s/template.h | 9 --------- src/s/usg5-4-common.h | 3 --- src/sysdep.c | 4 ++-- src/syssignal.h | 2 +- src/xterm.c | 6 +++--- 22 files changed, 52 insertions(+), 61 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2129d2991bf..ef040cdd2c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-03-27 Glenn Morris + + * configure.in (AC_TYPE_SIGNAL): Remove obsolete macro. + (AH_BOTTOM): Do not define SIGTYPE. + 2011-03-26 Glenn Morris * configure.in: Replace obsolete macros AC_TRY_COMPILE, AC_TRY_LINK, diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index dae6202b4e4..7f6a18f7d54 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -58,7 +58,6 @@ HAVE_TERMIOS INTERRUPT_INPUT NARROWPROTO SEPCHAR -SIGTYPE SYSTEM_TYPE ** Machine specific macros, decribed in detail in src/m/template.h @@ -238,7 +237,6 @@ SIGNALS_VIA_CHARACTERS SIGPIPE SIGQUIT SIGTRAP -SIGTYPE SOLARIS2 STDC_HEADERS SYSTEM_PURESIZE_EXTRA diff --git a/configure.in b/configure.in index fb71b82c464..77deef8dba5 100644 --- a/configure.in +++ b/configure.in @@ -1227,9 +1227,6 @@ if test $emacs_cv_struct_utimbuf = yes; then AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, [Define to 1 if `struct utimbuf' is declared by .]) fi -dnl checks for typedefs -AC_TYPE_SIGNAL - dnl Check for speed_t typedef. AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[speed_t x = 1;]])], @@ -3493,11 +3490,6 @@ AH_BOTTOM([ # define SYSTEM_PURESIZE_EXTRA 30000 #endif -/* SIGTYPE is the macro we actually use. */ -#ifndef SIGTYPE -#define SIGTYPE RETSIGTYPE -#endif - #ifdef emacs /* Don't do this for lib-src. */ /* Tell regex.c to use a type compatible with Emacs. */ #define RE_TRANSLATE_TYPE Lisp_Object diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 672fe8c8541..f594efa588c 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-27 Glenn Morris + + * emacsclient.c: Replace SIGTYPE with void. + 2011-03-23 Juanma Barranquero * ntlib.c: Include . diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index abc9aee37c1..737a8d88586 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1116,7 +1116,7 @@ socket_status (char *name) /* A signal handler that passes the signal to the Emacs process. Useful for SIGWINCH. */ -static SIGTYPE +static void pass_signal_to_emacs (int signalnum) { int old_errno = errno; @@ -1131,7 +1131,7 @@ pass_signal_to_emacs (int signalnum) /* Signal handler for SIGCONT; notify the Emacs process that it can now resume our tty frame. */ -static SIGTYPE +static void handle_sigcont (int signalnum) { int old_errno = errno; @@ -1157,7 +1157,7 @@ handle_sigcont (int signalnum) reality, we may get a SIGTSTP on C-z. Handling this signal and notifying Emacs about it should get things under control again. */ -static SIGTYPE +static void handle_sigtstp (int signalnum) { int old_errno = errno; diff --git a/nt/ChangeLog b/nt/ChangeLog index f041bac7360..a0603fd7c26 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2011-03-27 Glenn Morris + + * config.nt: Remove RETSIGTYPE, SIGTYPE (identical to void). + 2011-03-25 Juanma Barranquero * addpm.c (main): Remove unused variable `retval'. diff --git a/nt/config.nt b/nt/config.nt index 26fbc1c67c5..1d9a5faaf2c 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -393,15 +393,6 @@ along with GNU Emacs. If not, see . */ #undef STACK_DIRECTION #endif -/* Define the return type of signal handlers if the s-xxx file - did not already do so. */ -#define RETSIGTYPE void - -/* SIGTYPE is the macro we actually use. */ -#ifndef SIGTYPE -#define SIGTYPE RETSIGTYPE -#endif - #ifdef emacs /* Don't do this for lib-src. */ /* Tell regex.c to use a type compatible with Emacs. */ #define RE_TRANSLATE_TYPE Lisp_Object diff --git a/src/ChangeLog b/src/ChangeLog index 06972a5bcb1..54b24c50a1c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2011-03-27 Glenn Morris + + * syssignal.h: Replace RETSIGTYPE with void. + * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c: + * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c: + Replace SIGTYPE with void everywhere. + * s/usg5-4-common.h (SIGTYPE): Remove definition. + * s/template.h (SIGTYPE): Remove commented out definition. + 2011-03-26 Eli Zaretskii * xdisp.c (redisplay_window): Don't check buffer's clip_changed diff --git a/src/atimer.c b/src/atimer.c index e10add961eb..b947ea59ccd 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -64,7 +64,7 @@ static void set_alarm (void); static void schedule_atimer (struct atimer *); static struct atimer *append_atimer_lists (struct atimer *, struct atimer *); -SIGTYPE alarm_signal_handler (int signo); +void alarm_signal_handler (int signo); /* Start a new atimer of type TYPE. TIME specifies when the timer is @@ -388,7 +388,7 @@ run_timers (void) /* Signal handler for SIGALRM. SIGNO is the signal number, i.e. SIGALRM. */ -SIGTYPE +void alarm_signal_handler (int signo) { #ifndef SYNC_INPUT diff --git a/src/data.c b/src/data.c index 01aafbcede4..36a64d888de 100644 --- a/src/data.c +++ b/src/data.c @@ -3300,7 +3300,7 @@ syms_of_data (void) XSYMBOL (intern_c_string ("most-negative-fixnum"))->constant = 1; } -static SIGTYPE +static void arith_error (int signo) { sigsetmask (SIGEMPTYMASK); diff --git a/src/dispnew.c b/src/dispnew.c index 093ed9524e4..a15b5f45e60 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5566,7 +5566,7 @@ marginal_area_string (struct window *w, enum window_part part, #ifdef SIGWINCH -static SIGTYPE +static void window_change_signal (int signalnum) /* If we don't have an argument, */ /* some compilers complain in signal calls. */ { diff --git a/src/emacs.c b/src/emacs.c index 0382ade728d..6bdd2550ed1 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -308,7 +308,7 @@ pthread_t main_thread; /* Handle bus errors, invalid instruction, etc. */ -SIGTYPE +void fatal_error_signal (int sig) { SIGNAL_THREAD_CHECK (sig); @@ -345,7 +345,7 @@ fatal_error_signal (int sig) #ifdef SIGDANGER /* Handler for SIGDANGER. */ -SIGTYPE +void memory_warning_signal (sig) int sig; { diff --git a/src/floatfns.c b/src/floatfns.c index bc03509b757..1232fc0afa1 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -103,7 +103,7 @@ extern double logb (double); #endif #ifdef FLOAT_CATCH_SIGILL -static SIGTYPE float_error (); +static void float_error (); #endif /* Nonzero while executing in floating point. @@ -126,7 +126,7 @@ static const char *float_error_fn_name; Handle errors which may result in signals or may set errno. Note that float_error may be declared to return void, so you can't - just cast the zero after the colon to (SIGTYPE) to make the types + just cast the zero after the colon to (void) to make the types check properly. */ #ifdef FLOAT_CHECK_ERRNO @@ -960,7 +960,7 @@ Rounds the value toward zero. */) } #ifdef FLOAT_CATCH_SIGILL -static SIGTYPE +static void float_error (signo) int signo; { diff --git a/src/keyboard.c b/src/keyboard.c index c4ef2795f6a..06f375e0d9c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -434,15 +434,15 @@ static void restore_getcjmp (jmp_buf); static Lisp_Object apply_modifiers (int, Lisp_Object); static void clear_event (struct input_event *); static Lisp_Object restore_kboard_configuration (Lisp_Object); -static SIGTYPE interrupt_signal (int signalnum); +static void interrupt_signal (int signalnum); #ifdef SIGIO -static SIGTYPE input_available_signal (int signo); +static void input_available_signal (int signo); #endif static void handle_interrupt (void); static void timer_start_idle (void); static void timer_stop_idle (void); static void timer_resume_idle (void); -static SIGTYPE handle_user_signal (int); +static void handle_user_signal (int); static char *find_user_signal_name (int); static int store_user_signal_events (void); @@ -7082,7 +7082,7 @@ process_pending_signals (void) #ifdef SIGIO /* for entire page */ /* Note SIGIO has been undef'd if FIONREAD is missing. */ -static SIGTYPE +static void input_available_signal (int signo) { /* Must preserve main program's value of errno. */ @@ -7160,7 +7160,7 @@ add_user_signal (int sig, const char *name) signal (sig, handle_user_signal); } -static SIGTYPE +static void handle_user_signal (int sig) { int old_errno = errno; @@ -10712,7 +10712,7 @@ clear_waiting_for_input (void) SIGINT was generated by C-g, so we call handle_interrupt. Otherwise, the handler kills Emacs. */ -static SIGTYPE +static void interrupt_signal (int signalnum) /* If we don't have an argument, some */ /* compilers complain in signal calls. */ { diff --git a/src/keyboard.h b/src/keyboard.h index ba3c909c4dd..2ff370306b6 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -485,7 +485,7 @@ extern void push_frame_kboard (struct frame *); extern void pop_kboard (void); extern void temporarily_switch_to_single_kboard (struct frame *); extern void record_asynch_buffer_change (void); -extern SIGTYPE input_poll_signal (int); +extern void input_poll_signal (int); extern void start_polling (void); extern void stop_polling (void); extern void set_poll_suppress_count (int); diff --git a/src/lisp.h b/src/lisp.h index e98172ec104..8c7d4da8aa9 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3181,7 +3181,7 @@ extern Lisp_Object decode_env_path (const char *, const char *); extern Lisp_Object empty_unibyte_string, empty_multibyte_string; extern Lisp_Object Qfile_name_handler_alist; extern void (*fatal_error_signal_hook) (void); -extern SIGTYPE fatal_error_signal (int); +extern void fatal_error_signal (int); EXFUN (Fkill_emacs, 1) NO_RETURN; #if HAVE_SETLOCALE void fixup_locale (void); diff --git a/src/process.c b/src/process.c index 639b6a49fce..148f5b59f8a 100644 --- a/src/process.c +++ b/src/process.c @@ -5470,7 +5470,7 @@ read_process_output (Lisp_Object proc, register int channel) jmp_buf send_process_frame; Lisp_Object process_sent_to; -static SIGTYPE +static void send_process_trap (int ignore) { SIGNAL_THREAD_CHECK (SIGPIPE); @@ -5497,7 +5497,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, EMACS_INT rv; struct coding_system *coding; struct gcpro gcpro1; - SIGTYPE (*volatile old_sigpipe) (int); + void (*volatile old_sigpipe) (int); GCPRO1 (object); @@ -5619,7 +5619,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, while (this > 0) { int outfd = p->outfd; - old_sigpipe = (SIGTYPE (*) (int)) signal (SIGPIPE, send_process_trap); + old_sigpipe = (void (*) (int)) signal (SIGPIPE, send_process_trap); #ifdef DATAGRAM_SOCKETS if (DATAGRAM_CHAN_P (outfd)) { @@ -6379,7 +6379,7 @@ process has been transmitted to the serial port. */) indirectly; if it does, that is a bug */ #ifdef SIGCHLD -static SIGTYPE +static void sigchld_handler (int signo) { int old_errno = errno; diff --git a/src/s/template.h b/src/s/template.h index ee5afa81de4..4e0400e99e3 100644 --- a/src/s/template.h +++ b/src/s/template.h @@ -77,15 +77,6 @@ along with GNU Emacs. If not, see . */ a file that someone else has modified in his Emacs. */ #define CLASH_DETECTION -/* Define this if your operating system declares signal handlers to - have a type other than the usual. `The usual' is `void' for ANSI C - systems (i.e. when the __STDC__ macro is defined), and `int' for - pre-ANSI systems. If you're using GCC on an older system, __STDC__ - will be defined, but the system's include files will still say that - signal returns int or whatever; in situations like that, define - this to be what the system's include files want. */ -/* #define SIGTYPE int */ - /* If the character used to separate elements of the executable path is not ':', #define this to be the appropriate character constant. */ /* #define SEPCHAR ':' */ diff --git a/src/s/usg5-4-common.h b/src/s/usg5-4-common.h index aeedd7f4b15..236f71e3007 100644 --- a/src/s/usg5-4-common.h +++ b/src/s/usg5-4-common.h @@ -38,9 +38,6 @@ along with GNU Emacs. If not, see . */ /* The docs for system V/386 suggest v.3 has sigpause, so let's try it. */ #define HAVE_SYSV_SIGPAUSE -/* On USG systems signal handlers return void. */ -#define SIGTYPE void - /* Get FIONREAD from . Get to get struct tchars. But get first to make sure ttold.h doesn't interfere. And don't try to use SIGIO yet. */ diff --git a/src/sysdep.c b/src/sysdep.c index 14db0fd26d0..1bb400421f0 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -449,7 +449,7 @@ child_setup_tty (int out) struct save_signal { int code; - SIGTYPE (*handler) (int); + void (*handler) (int); }; static void save_signal_handlers (struct save_signal *); @@ -608,7 +608,7 @@ save_signal_handlers (struct save_signal *saved_handlers) while (saved_handlers->code) { saved_handlers->handler - = (SIGTYPE (*) (int)) signal (saved_handlers->code, SIG_IGN); + = (void (*) (int)) signal (saved_handlers->code, SIG_IGN); saved_handlers++; } } diff --git a/src/syssignal.h b/src/syssignal.h index 7b4070322d6..03768168e20 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -69,7 +69,7 @@ extern sigset_t sys_sigmask (); /* Whether this is what all systems want or not, this is what appears to be assumed in the source, for example data.c:arith_error. */ -typedef RETSIGTYPE (*signal_handler_t) (int); +typedef void (*signal_handler_t) (int); signal_handler_t sys_signal (int signal_number, signal_handler_t action); sigset_t sys_sigblock (sigset_t new_mask); diff --git a/src/xterm.c b/src/xterm.c index f87c22912a4..0b18356b0a3 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -349,7 +349,7 @@ static int handle_one_xevent (struct x_display_info *, XEvent *, int *, struct input_event *); /* Don't declare this NO_RETURN because we want no interference with debugging failing X calls. */ -static SIGTYPE x_connection_closed (Display *, const char *); +static void x_connection_closed (Display *, const char *); /* Flush display of frame F, or of all frames if F is null. */ @@ -7650,7 +7650,7 @@ x_trace_wire (void) SIGPIPE will fail, causing Xlib to invoke the X IO error handler, which will do the appropriate cleanup for us. */ -static SIGTYPE +static void x_connection_signal (int signalnum) /* If we don't have an argument, */ /* some compilers complain in signal calls. */ { @@ -7673,7 +7673,7 @@ static char *error_msg; /* Handle the loss of connection to display DPY. ERROR_MESSAGE is the text of an error message that lead to the connection loss. */ -static SIGTYPE +static void x_connection_closed (Display *dpy, const char *error_message) { struct x_display_info *dpyinfo = x_display_info_for_display (dpy); From a4800c245067b1344d83e7cc6b2c538cbc0d2606 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 26 Mar 2011 22:33:36 -0400 Subject: [PATCH 131/166] Auto-commit of generated files. --- autogen/config.in | 8 -------- autogen/configure | 34 ---------------------------------- 2 files changed, 42 deletions(-) diff --git a/autogen/config.in b/autogen/config.in index eb7fd7749dd..57ff5f45e0c 100644 --- a/autogen/config.in +++ b/autogen/config.in @@ -999,9 +999,6 @@ along with GNU Emacs. If not, see . */ slash */ #undef REPLACE_FUNC_STAT_FILE -/* Define as the return type of signal handlers (`int' or `void'). */ -#undef RETSIGTYPE - /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ #undef SIG_ATOMIC_T_SUFFIX @@ -1274,11 +1271,6 @@ along with GNU Emacs. If not, see . */ # define SYSTEM_PURESIZE_EXTRA 30000 #endif -/* SIGTYPE is the macro we actually use. */ -#ifndef SIGTYPE -#define SIGTYPE RETSIGTYPE -#endif - #ifdef emacs /* Don't do this for lib-src. */ /* Tell regex.c to use a type compatible with Emacs. */ #define RE_TRANSLATE_TYPE Lisp_Object diff --git a/autogen/configure b/autogen/configure index 47b760c2dd8..94c65d62ccd 100755 --- a/autogen/configure +++ b/autogen/configure @@ -7899,40 +7899,6 @@ $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } - -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 $as_echo_n "checking for speed_t... " >&6; } if test "${emacs_cv_speed_t+set}" = set; then : From fe75f92609a806701f8a4d0385f3a053bc00e63d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 27 Mar 2011 01:10:27 -0700 Subject: [PATCH 132/166] * chartab.c (sub_char_table_ref_and_range): Redo for slight efficiency gain, and to bypass a gcc -Wstrict-overflow warning. --- src/ChangeLog | 3 +++ src/chartab.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8a20c06b41c..6127bc0e8da 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-27 Paul Eggert + * chartab.c (sub_char_table_ref_and_range): Redo for slight + efficiency gain, and to bypass a gcc -Wstrict-overflow warning. + * keyboard.c, keyboard.h (num_input_events): Now size_t. This avoids undefined behavior on integer overflow, and is a bit more convenient anyway since it is compared to a size_t variable. diff --git a/src/chartab.c b/src/chartab.c index 85aa5932ac3..9ad182131e9 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -215,7 +215,6 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); int depth = XINT (tbl->depth); int min_char = XINT (tbl->min_char); - int max_char = min_char + chartab_chars[depth - 1] - 1; int chartab_idx = CHARTAB_IDX (c, depth, min_char), idx; Lisp_Object val; @@ -244,8 +243,9 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp break; } } - while ((c = min_char + (chartab_idx + 1) * chartab_chars[depth]) <= max_char - && *to >= c) + while (((c = (chartab_idx + 1) * chartab_chars[depth]) + < chartab_chars[depth - 1]) + && (c += min_char) <= *to) { Lisp_Object this_val; From eb4d412de87ff7078f4c0923ea014db01b7ce551 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 27 Mar 2011 01:21:49 -0700 Subject: [PATCH 133/166] * syntax.c (scan_sexps_forward): Avoid pointer wraparound. --- src/ChangeLog | 2 ++ src/syntax.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3d917d0e5a4..8704ba4b904 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-27 Paul Eggert + * syntax.c (scan_sexps_forward): Avoid pointer wraparound. + * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow concerns. diff --git a/src/syntax.c b/src/syntax.c index c1442c396c1..0a1525b54ea 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -3265,9 +3265,9 @@ do { prev_from = from; \ = (curlevel == levelstart) ? -1 : (curlevel - 1)->last; state.location = from; state.levelstarts = Qnil; - while (--curlevel >= levelstart) - state.levelstarts = Fcons (make_number (curlevel->last), - state.levelstarts); + while (curlevel > levelstart) + state.levelstarts = Fcons (make_number ((--curlevel)->last), + state.levelstarts); immediate_quit = 0; *stateptr = state; From a3eed4788d421bbb778a3832fe17d82cafe3ca41 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 27 Mar 2011 01:29:39 -0700 Subject: [PATCH 134/166] * eval.c (Fbacktrace): Don't assume nargs fits in int. --- src/ChangeLog | 2 ++ src/eval.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8704ba4b904..57389f306be 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-27 Paul Eggert + * eval.c (Fbacktrace): Don't assume nargs fits in int. + * syntax.c (scan_sexps_forward): Avoid pointer wraparound. * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow diff --git a/src/eval.c b/src/eval.c index b9d9354f48a..b732cbc644a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3298,7 +3298,6 @@ Output stream used is value of `standard-output'. */) (void) { register struct backtrace *backlist = backtrace_list; - register int i; Lisp_Object tail; Lisp_Object tem; struct gcpro gcpro1; @@ -3325,9 +3324,10 @@ Output stream used is value of `standard-output'. */) write_string ("(", -1); if (backlist->nargs == (size_t) MANY) { + int i; for (tail = *backlist->args, i = 0; !NILP (tail); - tail = Fcdr (tail), i++) + tail = Fcdr (tail), i = 1) { if (i) write_string (" ", -1); Fprin1 (Fcar (tail), Qnil); @@ -3335,6 +3335,7 @@ Output stream used is value of `standard-output'. */) } else { + size_t i; for (i = 0; i < backlist->nargs; i++) { if (i) write_string (" ", -1); From 5d5d959d59d80e3beebc9788333ea5a2449a10df Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 27 Mar 2011 01:31:16 -0700 Subject: [PATCH 135/166] * eval.c (Fbacktrace_frame): Don't assume nframes fits in int. --- src/ChangeLog | 1 + src/eval.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 57389f306be..3998d74ba0c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-27 Paul Eggert * eval.c (Fbacktrace): Don't assume nargs fits in int. + (Fbacktrace_frame): Don't assume nframes fits in int. * syntax.c (scan_sexps_forward): Avoid pointer wraparound. diff --git a/src/eval.c b/src/eval.c index b732cbc644a..982fec66bbf 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3365,7 +3365,7 @@ If NFRAMES is more than the number of frames, the value is nil. */) (Lisp_Object nframes) { register struct backtrace *backlist = backtrace_list; - register int i; + register EMACS_INT i; Lisp_Object tem; CHECK_NATNUM (nframes); From 3c59b4c9d671ec0298a8489eabbd09af47039852 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 27 Mar 2011 02:07:38 -0700 Subject: [PATCH 136/166] * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA instead of alloca (Bug#8344). --- src/ChangeLog | 3 +++ src/callproc.c | 56 +++++++++++++++++++++++++++++--------------------- 2 files changed, 36 insertions(+), 23 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3998d74ba0c..6cb8ad8000d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-27 Paul Eggert + * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA + instead of alloca (Bug#8344). + * eval.c (Fbacktrace): Don't assume nargs fits in int. (Fbacktrace_frame): Don't assume nframes fits in int. diff --git a/src/callproc.c b/src/callproc.c index acb7a0e24b1..eb2a2268fe1 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -189,6 +189,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) char buf[CALLPROC_BUFFER_SIZE_MAX]; int bufsize = CALLPROC_BUFFER_SIZE_MIN; int count = SPECPDL_INDEX (); + volatile USE_SAFE_ALLOCA; const unsigned char **volatile new_argv_volatile; register const unsigned char **new_argv; @@ -242,7 +243,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) val = Qraw_text; else { - args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); + SAFE_ALLOCA (args2, Lisp_Object *, (nargs + 1) * sizeof *args2); args2[0] = Qcall_process; for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; coding_systems = Ffind_operation_coding_system (nargs + 1, args2); @@ -372,8 +373,9 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) && SREF (path, 1) == ':') path = Fsubstring (path, make_number (2), Qnil); - new_argv_volatile = new_argv = (const unsigned char **) - alloca ((nargs > 4 ? nargs - 2 : 2) * sizeof (char *)); + SAFE_ALLOCA (new_argv, const unsigned char **, + (nargs > 4 ? nargs - 2 : 2) * sizeof *new_argv); + new_argv_volatile = new_argv; if (nargs > 4) { register size_t i; @@ -645,7 +647,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) { size_t i; - args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); + SAFE_ALLOCA (args2, Lisp_Object *, (nargs + 1) * sizeof *args2); args2[0] = Qcall_process; for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; coding_systems @@ -809,6 +811,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) when exiting. */ call_process_exited = 1; + SAFE_FREE (); unbind_to (count, Qnil); if (synch_process_termsig) @@ -897,30 +900,35 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r #endif } - pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir); - tempfile = (char *) alloca (SBYTES (pattern) + 1); - memcpy (tempfile, SDATA (pattern), SBYTES (pattern) + 1); - coding_systems = Qt; + { + USE_SAFE_ALLOCA; + pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir); + SAFE_ALLOCA (tempfile, char *, SBYTES (pattern) + 1); + memcpy (tempfile, SDATA (pattern), SBYTES (pattern) + 1); + coding_systems = Qt; #ifdef HAVE_MKSTEMP - { - int fd; + { + int fd; - BLOCK_INPUT; - fd = mkstemp (tempfile); - UNBLOCK_INPUT; - if (fd == -1) - report_file_error ("Failed to open temporary file", - Fcons (Vtemp_file_name_pattern, Qnil)); - else - close (fd); - } + BLOCK_INPUT; + fd = mkstemp (tempfile); + UNBLOCK_INPUT; + if (fd == -1) + report_file_error ("Failed to open temporary file", + Fcons (Vtemp_file_name_pattern, Qnil)); + else + close (fd); + } #else - mktemp (tempfile); + mktemp (tempfile); #endif - filename_string = build_string (tempfile); - GCPRO1 (filename_string); + filename_string = build_string (tempfile); + GCPRO1 (filename_string); + SAFE_FREE (); + } + start = args[0]; end = args[1]; /* Decide coding-system of the contents of the temporary file. */ @@ -930,11 +938,13 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r val = Qraw_text; else { - args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); + USE_SAFE_ALLOCA; + SAFE_ALLOCA (args2, Lisp_Object *, (nargs + 1) * sizeof *args2); args2[0] = Qcall_process_region; for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; coding_systems = Ffind_operation_coding_system (nargs + 1, args2); val = CONSP (coding_systems) ? XCDR (coding_systems) : Qnil; + SAFE_FREE (); } val = complement_process_encoding_system (val); From 5c380ffb17f2fb6f22d9f24a7732b7e4a1e0cd52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 27 Mar 2011 11:23:52 +0200 Subject: [PATCH 137/166] * nsmenu.m (runDialogAt): Remove argument to timer_check. --- src/ChangeLog | 4 ++++ src/nsmenu.m | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 54b24c50a1c..eb03806b33a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-27 Jan Djärv + + * nsmenu.m (runDialogAt): Remove argument to timer_check. + 2011-03-27 Glenn Morris * syssignal.h: Replace RETSIGTYPE with void. diff --git a/src/nsmenu.m b/src/nsmenu.m index e8d4a256906..623c933ce8e 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -1705,7 +1705,6 @@ void process_dialog (id window, Lisp_Object list) - (Lisp_Object)runDialogAt: (NSPoint)p { NSInteger ret; - extern EMACS_TIME timer_check (int do_it_now); /* TODO: add to a header */ /* initiate a session that will be ended by pop_down_menu */ popupSession = [NSApp beginModalSessionForWindow: self]; @@ -1715,7 +1714,7 @@ void process_dialog (id window, Lisp_Object list) { /* Run this for timers.el, indep of atimers; might not return. TODO: use return value to avoid calling every iteration. */ - timer_check (1); + timer_check (); [NSThread sleepUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.1]]; } From f0a1382af3afa31708d3ce2f4c28bce61565aada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 27 Mar 2011 12:36:44 +0200 Subject: [PATCH 138/166] Introduce ns-auto-hide-menu-bar to hide menubar for Emacs frames. Code by Anders Lindgren. * nsterm.m (ns_menu_bar_is_hidden): New variable. (ns_constrain_all_frames, ns_menu_bar_should_be_hidden) (ns_update_auto_hide_menu_bar): New functions. (ns_update_begin): Call ns_update_auto_hide_menu_bar. (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and ns_constrain_all_frames. (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden. (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil. --- src/ChangeLog | 11 +++++ src/nsterm.m | 130 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 140 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index eb03806b33a..96f60877fce 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2011-03-27 Anders Lindgren + + * nsterm.m (ns_menu_bar_is_hidden): New variable. + (ns_constrain_all_frames, ns_menu_bar_should_be_hidden) + (ns_update_auto_hide_menu_bar): New functions. + (ns_update_begin): Call ns_update_auto_hide_menu_bar. + (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and + ns_constrain_all_frames. + (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden. + (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil. + 2011-03-27 Jan Djärv * nsmenu.m (runDialogAt): Remove argument to timer_check. diff --git a/src/nsterm.m b/src/nsterm.m index c7cd411c614..ebfa875ae0e 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -170,6 +170,7 @@ BOOL ns_in_resize = NO; static BOOL ns_fake_keydown = NO; int ns_tmp_flags; /* FIXME */ struct nsfont_info *ns_tmp_font; /* FIXME */ +static BOOL ns_menu_bar_is_hidden = NO; /*static int debug_lock = 0; */ /* event loop */ @@ -505,6 +506,118 @@ ns_resize_handle_rect (NSWindow *window) } +// +// Window constraining +// ------------------- +// +// To ensure that the windows are not placed under the menu bar, they +// are typically moved by the call-back constrainFrameRect. However, +// by overriding it, it's possible to inhibit this, leaving the window +// in it's original position. +// +// It's possible to hide the menu bar. However, technically, it's only +// possible to hide it when the application is active. To ensure that +// this work properly, the menu bar and window constraining are +// deferred until the application becomes active. +// +// Even though it's not possible to manually move a window above the +// top of the screen, it is allowed if it's done programmatically, +// when the menu is hidden. This allows the editable area to cover the +// full screen height. +// +// Test cases +// ---------- +// +// Use the following extra files: +// +// init.el: +// ;; Hide menu and place frame slightly above the top of the screen. +// (setq ns-auto-hide-menu-bar t) +// (set-frame-position (selected-frame) 0 -20) +// +// Test 1: +// +// emacs -Q -l init.el +// +// Result: No menu bar, and the title bar should be above the screen. +// +// Test 2: +// +// emacs -Q +// +// Result: Menu bar visible, frame placed immediately below the menu. +// + +static void +ns_constrain_all_frames (void) +{ + Lisp_Object tail, frame; + + FOR_EACH_FRAME (tail, frame) + { + struct frame *f = XFRAME (frame); + if (FRAME_NS_P (f)) + { + NSView *view = FRAME_NS_VIEW (f); + /* This no-op will trigger the default window placing + * constriant system. */ + f->output_data.ns->dont_constrain = 0; + [[view window] setFrameOrigin:[[view window] frame].origin]; + } + } +} + + +/* True, if the menu bar should be hidden. */ + +static BOOL +ns_menu_bar_should_be_hidden (void) +{ + return !NILP (ns_auto_hide_menu_bar) + && [NSApp respondsToSelector:@selector(setPresentationOptions:)]; +} + + +/* Show or hide the menu bar, based on user setting. */ + +static void +ns_update_auto_hide_menu_bar (void) +{ + BLOCK_INPUT; + + NSTRACE (ns_update_auto_hide_menu_bar); + + if (NSApp != nil + && [NSApp isActive] + && [NSApp respondsToSelector:@selector(setPresentationOptions:)]) + { + // Note, "setPresentationOptions" triggers an error unless the + // application is active. + BOOL menu_bar_should_be_hidden = ns_menu_bar_should_be_hidden (); + + if (menu_bar_should_be_hidden != ns_menu_bar_is_hidden) + { + NSApplicationPresentationOptions options + = NSApplicationPresentationAutoHideDock; + + if (menu_bar_should_be_hidden) + options |= NSApplicationPresentationAutoHideMenuBar; + + [NSApp setPresentationOptions: options]; + + ns_menu_bar_is_hidden = menu_bar_should_be_hidden; + + if (!ns_menu_bar_is_hidden) + { + ns_constrain_all_frames (); + } + } + } + + UNBLOCK_INPUT; +} + + static void ns_update_begin (struct frame *f) /* -------------------------------------------------------------------------- @@ -515,6 +628,8 @@ ns_update_begin (struct frame *f) NSView *view = FRAME_NS_VIEW (f); NSTRACE (ns_update_begin); + ns_update_auto_hide_menu_bar (); + ns_updating_frame = f; [view lockFocus]; @@ -4205,7 +4320,13 @@ ns_term_shutdown (int sig) } - (void)applicationDidBecomeActive: (NSNotification *)notification { + NSTRACE (applicationDidBecomeActive); + //ns_app_active=YES; + + ns_update_auto_hide_menu_bar (); + // No constrining takes place when the application is not active. + ns_constrain_all_frames (); } - (void)applicationDidResignActive: (NSNotification *)notification { @@ -5689,7 +5810,10 @@ ns_term_shutdown (int sig) /* When making the frame visible for the first time, we want to constrain. Other times not. */ struct frame *f = ((EmacsView *)[self delegate])->emacsframe; - if (f->output_data.ns->dont_constrain) + NSTRACE (constrainFrameRect); + + if (f->output_data.ns->dont_constrain + || ns_menu_bar_should_be_hidden ()) return frameRect; f->output_data.ns->dont_constrain = 1; @@ -6361,6 +6485,10 @@ allowing it to be used at a lower level for accented character entry."); staticpro (&last_mouse_motion_frame); last_mouse_motion_frame = Qnil; + DEFVAR_LISP ("ns-auto-hide-menu-bar", ns_auto_hide_menu_bar, + "Non-nil means that the menu bar is hidden, but appears when the mouse is near. Only works on OSX 10.6 or later."); + ns_auto_hide_menu_bar = Qnil; + /* TODO: move to common code */ DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, doc: /* If not nil, Emacs uses toolkit scroll bars. */); From 5ffb62aa7e2a1f60e05399a0088e77a3e7a57d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 27 Mar 2011 12:55:07 +0200 Subject: [PATCH 139/166] Format doc and add customize for ns-auto-hide-menu-bar. * lisp/cus-start.el (all): Add boolean ns-auto-hide-menu-bar. * src/nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar. --- etc/NEWS | 3 +++ lisp/ChangeLog | 4 ++++ lisp/cus-start.el | 1 + src/ChangeLog | 4 ++++ src/nsterm.m | 3 ++- 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 263ab2eff3b..c48af3a3b40 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -162,6 +162,9 @@ cannot be encoded by the `terminal-coding-system'. ** On graphical displays, the mode-line no longer ends in dashes. +** On Nextstep/OSX, the menu bar can be hidden by customizing + ns-auto-hide-menu-bar. + ** Basic SELinux support has been added. This requires Emacs to be linked with libselinux at build time. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f6d06821062..a8838161136 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-27 Jan Djärv + + * cus-start.el (all): Add boolean ns-auto-hide-menu-bar. + 2011-03-27 Leo Liu * ansi-color.el (ansi-color-names-vector): Allow cons cell value diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 788731e4dbc..1188d37150a 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -356,6 +356,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of (const alt) (const hyper) (const super)) "23.1") (ns-antialias-text ns boolean "23.1") + (ns-auto-hide-menu-bar ns boolean "24.0") ;; process.c (delete-exited-processes processes-basics boolean) ;; syntax.c diff --git a/src/ChangeLog b/src/ChangeLog index 96f60877fce..0ed011884ca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-27 Jan Djärv + + * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar. + 2011-03-27 Anders Lindgren * nsterm.m (ns_menu_bar_is_hidden): New variable. diff --git a/src/nsterm.m b/src/nsterm.m index ebfa875ae0e..91f0cbba585 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6486,7 +6486,8 @@ allowing it to be used at a lower level for accented character entry."); last_mouse_motion_frame = Qnil; DEFVAR_LISP ("ns-auto-hide-menu-bar", ns_auto_hide_menu_bar, - "Non-nil means that the menu bar is hidden, but appears when the mouse is near. Only works on OSX 10.6 or later."); + doc: /* Non-nil means that the menu bar is hidden, but appears when the mouse is near. +Only works on OSX 10.6 or later. */); ns_auto_hide_menu_bar = Qnil; /* TODO: move to common code */ From ba0165e1f14c55aaba73de35d75a9acea721c825 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 27 Mar 2011 10:14:11 -0700 Subject: [PATCH 140/166] * keyboard.c (parse_modifiers_uncached, parse_modifiers): Don't assume string length fits in int. --- src/ChangeLog | 3 +++ src/keyboard.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6cb8ad8000d..bfee23b16d0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-27 Paul Eggert + * keyboard.c (parse_modifiers_uncached, parse_modifiers): + Don't assume string length fits in int. + * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA instead of alloca (Bug#8344). diff --git a/src/keyboard.c b/src/keyboard.c index 28d65766664..e29c7e9bc5c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -5959,10 +5959,10 @@ make_lispy_switch_frame (Lisp_Object frame) This doesn't use any caches. */ static int -parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end) +parse_modifiers_uncached (Lisp_Object symbol, EMACS_INT *modifier_end) { Lisp_Object name; - int i; + EMACS_INT i; int modifiers; CHECK_SYMBOL (symbol); @@ -5972,7 +5972,7 @@ parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end) for (i = 0; i+2 <= SBYTES (name); ) { - int this_mod_end = 0; + EMACS_INT this_mod_end = 0; int this_mod = 0; /* See if the name continues with a modifier word. @@ -6169,7 +6169,7 @@ parse_modifiers (Lisp_Object symbol) return elements; else { - int end; + EMACS_INT end; int modifiers = parse_modifiers_uncached (symbol, &end); Lisp_Object unmodified; Lisp_Object mask; From 32ad8845a456fef4118a657b79129e837b4ec778 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 27 Mar 2011 11:18:31 -0700 Subject: [PATCH 141/166] * keyboard.c (keyremap_step, read_key_sequence): Use size_t for sizes. --- src/ChangeLog | 1 + src/keyboard.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bfee23b16d0..8b32aa78a6d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * keyboard.c (parse_modifiers_uncached, parse_modifiers): Don't assume string length fits in int. + (keyremap_step, read_key_sequence): Use size_t for sizes. * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA instead of alloca (Bug#8344). diff --git a/src/keyboard.c b/src/keyboard.c index e29c7e9bc5c..0fde344478e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1270,7 +1270,7 @@ some_mouse_moved (void) /* This is the actual command reading loop, sans error-handling encapsulation. */ -static int read_key_sequence (Lisp_Object *, int, Lisp_Object, +static int read_key_sequence (Lisp_Object *, size_t, Lisp_Object, int, int, int); void safe_run_hooks (Lisp_Object); static void adjust_point_for_property (EMACS_INT, int); @@ -8748,7 +8748,7 @@ access_keymap_keyremap (Lisp_Object map, Lisp_Object key, Lisp_Object prompt, The return value is non-zero if the remapping actually took place. */ static int -keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey, +keyremap_step (Lisp_Object *keybuf, size_t bufsize, volatile keyremap *fkey, int input, int doit, int *diff, Lisp_Object prompt) { Lisp_Object next, key; @@ -8841,7 +8841,7 @@ keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey, from the selected window's buffer. */ static int -read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, +read_key_sequence (Lisp_Object *keybuf, size_t bufsize, Lisp_Object prompt, int dont_downcase_last, int can_return_switch_frame, int fix_current_buffer) { From 48011560d73038cbfebfd9d272eabec55005db78 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 27 Mar 2011 11:33:45 -0700 Subject: [PATCH 142/166] * keyboard.c (read_key_sequence): Don't check last_real_key_start redundantly. --- src/ChangeLog | 1 + src/keyboard.c | 138 +++++++++++++++++++++++++------------------------ 2 files changed, 72 insertions(+), 67 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8b32aa78a6d..eb1555db6fb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * keyboard.c (parse_modifiers_uncached, parse_modifiers): Don't assume string length fits in int. (keyremap_step, read_key_sequence): Use size_t for sizes. + (read_key_sequence): Don't check last_real_key_start redundantly. * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA instead of alloca (Bug#8344). diff --git a/src/keyboard.c b/src/keyboard.c index 0fde344478e..6c706590dc4 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -9359,80 +9359,84 @@ read_key_sequence (Lisp_Object *keybuf, size_t bufsize, Lisp_Object prompt, last_real_key_start = t - 1; } - /* Key sequences beginning with mouse clicks are - read using the keymaps in the buffer clicked on, - not the current buffer. If we're at the - beginning of a key sequence, switch buffers. */ - if (last_real_key_start == 0 - && WINDOWP (window) - && BUFFERP (XWINDOW (window)->buffer) - && XBUFFER (XWINDOW (window)->buffer) != current_buffer) + if (last_real_key_start == 0) { - XVECTOR (raw_keybuf)->contents[raw_keybuf_count++] = key; - keybuf[t] = key; - mock_input = t + 1; - - /* Arrange to go back to the original buffer once we're - done reading the key sequence. Note that we can't - use save_excursion_{save,restore} here, because they - save point as well as the current buffer; we don't - want to save point, because redisplay may change it, - to accommodate a Fset_window_start or something. We - don't want to do this at the top of the function, - because we may get input from a subprocess which - wants to change the selected window and stuff (say, - emacsclient). */ - record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); - - if (! FRAME_LIVE_P (XFRAME (selected_frame))) - Fkill_emacs (Qnil); - set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); - orig_local_map = get_local_map (PT, current_buffer, - Qlocal_map); - orig_keymap = get_local_map (PT, current_buffer, Qkeymap); - goto replay_sequence; - } - - /* For a mouse click, get the local text-property keymap - of the place clicked on, rather than point. */ - if (last_real_key_start == 0 - && CONSP (XCDR (key)) - && ! localized_local_map) - { - Lisp_Object map_here, start, pos; - - localized_local_map = 1; - start = EVENT_START (key); - - if (CONSP (start) && POSN_INBUFFER_P (start)) + /* Key sequences beginning with mouse clicks are + read using the keymaps in the buffer clicked on, + not the current buffer. If we're at the + beginning of a key sequence, switch buffers. */ + if (WINDOWP (window) + && BUFFERP (XWINDOW (window)->buffer) + && XBUFFER (XWINDOW (window)->buffer) != current_buffer) { - pos = POSN_BUFFER_POSN (start); - if (INTEGERP (pos) - && XINT (pos) >= BEGV - && XINT (pos) <= ZV) + XVECTOR (raw_keybuf)->contents[raw_keybuf_count++] = key; + keybuf[t] = key; + mock_input = t + 1; + + /* Arrange to go back to the original buffer once we're + done reading the key sequence. Note that we can't + use save_excursion_{save,restore} here, because they + save point as well as the current buffer; we don't + want to save point, because redisplay may change it, + to accommodate a Fset_window_start or something. We + don't want to do this at the top of the function, + because we may get input from a subprocess which + wants to change the selected window and stuff (say, + emacsclient). */ + record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); + + if (! FRAME_LIVE_P (XFRAME (selected_frame))) + Fkill_emacs (Qnil); + set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); + orig_local_map = get_local_map (PT, current_buffer, + Qlocal_map); + orig_keymap = get_local_map (PT, current_buffer, + Qkeymap); + goto replay_sequence; + } + + /* For a mouse click, get the local text-property keymap + of the place clicked on, rather than point. */ + if (CONSP (XCDR (key)) + && ! localized_local_map) + { + Lisp_Object map_here, start, pos; + + localized_local_map = 1; + start = EVENT_START (key); + + if (CONSP (start) && POSN_INBUFFER_P (start)) { - map_here = get_local_map (XINT (pos), - current_buffer, Qlocal_map); - if (!EQ (map_here, orig_local_map)) + pos = POSN_BUFFER_POSN (start); + if (INTEGERP (pos) + && XINT (pos) >= BEGV + && XINT (pos) <= ZV) { - orig_local_map = map_here; - ++localized_local_map; - } + map_here = get_local_map (XINT (pos), + current_buffer, + Qlocal_map); + if (!EQ (map_here, orig_local_map)) + { + orig_local_map = map_here; + ++localized_local_map; + } - map_here = get_local_map (XINT (pos), - current_buffer, Qkeymap); - if (!EQ (map_here, orig_keymap)) - { - orig_keymap = map_here; - ++localized_local_map; - } + map_here = get_local_map (XINT (pos), + current_buffer, + Qkeymap); + if (!EQ (map_here, orig_keymap)) + { + orig_keymap = map_here; + ++localized_local_map; + } - if (localized_local_map > 1) - { - keybuf[t] = key; - mock_input = t + 1; + if (localized_local_map > 1) + { + keybuf[t] = key; + mock_input = t + 1; - goto replay_sequence; + goto replay_sequence; + } } } } From 42e85a8ffd37fc11fe569cb571fbd73a6d8c8b45 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 27 Mar 2011 17:48:39 -0700 Subject: [PATCH 143/166] Make autogen.sh respect AUTOCONF etc. * autogen.sh (get_version): Discard "not found" lines. (check_version): Respect $AUTOCONF etc environment variables. --- ChangeLog | 5 +++++ autogen.sh | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef040cdd2c8..8cb0aa05ef2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-03-28 Glenn Morris + + * autogen.sh (get_version): Discard "not found" lines. + (check_version): Respect $AUTOCONF etc environment variables. + 2011-03-27 Glenn Morris * configure.in (AC_TYPE_SIGNAL): Remove obsolete macro. diff --git a/autogen.sh b/autogen.sh index ce742a9c18a..d15817d0596 100755 --- a/autogen.sh +++ b/autogen.sh @@ -30,6 +30,7 @@ ### Code: ## Tools we need: +## Note that we respect the values of AUTOCONF etc, like autoreconf does. progs="autoconf automake" ## Minimum versions we need: @@ -46,7 +47,8 @@ automake_min=1.11 ## Also note that we do not handle micro versions. get_version () { - $1 --version 2>&1 | sed -n '1 s/.* \([1-9][0-9\.]*\).*/\1/p' + ## Remove eg "./autogen.sh: line 50: autoconf: command not found". + $1 --version 2>&1 | sed -e '/not found/d' -n -e '1 s/.* \([1-9][0-9\.]*\).*/\1/p' } ## $1 = version string, eg "2.59" @@ -71,7 +73,14 @@ minor_version () ## Return 3 for unexpected error (eg failed to parse version). check_version () { - have_version=`get_version $1` + ## Respect eg $AUTOMAKE if it is set, like autoreconf does. + uprog=`echo $1 | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + + eval uprog=\$${uprog} + + [ x"$uprog" = x ] && uprog=$1 + + have_version=`get_version $uprog` [ x"$have_version" = x ] && return 1 From 39f3187393af8fbf597591e284490db94a335f94 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 27 Mar 2011 18:03:57 -0700 Subject: [PATCH 144/166] * autogen/update_autogen: Pass -f to autoreconf. --- ChangeLog | 2 ++ autogen/update_autogen | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8cb0aa05ef2..bf7a6af63b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2011-03-28 Glenn Morris + * autogen/update_autogen: Pass -f to autoreconf. + * autogen.sh (get_version): Discard "not found" lines. (check_version): Respect $AUTOCONF etc environment variables. diff --git a/autogen/update_autogen b/autogen/update_autogen index d8b451c370b..b2a6d0b42a4 100755 --- a/autogen/update_autogen +++ b/autogen/update_autogen @@ -126,7 +126,7 @@ done < $tempfile echo "Running autoreconf..." -autoreconf -i -I m4 2>| $tempfile +autoreconf -f -i -I m4 2>| $tempfile retval=$? From 1db5b1ad87a145871fc1120ec949fee9211de9cb Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 28 Mar 2011 05:29:18 +0200 Subject: [PATCH 145/166] src/*.c: Remove unused parameters and other warnings. * dispextern.h (string_buffer_position): Remove declaration. * print.c (strout): Remove parameter `multibyte', unused since 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed. * search.c (boyer_moore): Remove parameters `len', `pos' and `lim', never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org. All callers changed. * w32.c (_wsa_errlist): Use braces for struct initializers. * xdisp.c (string_buffer_position_lim): Remove parameter `w', never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org. All callers changed. (string_buffer_position): Likewise. Also, make static (it's never used outside xdisp.c). (cursor_row_p): Remove parameter `w', unused since 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed. (decode_mode_spec): Remove parameter `precision', introduced during Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used. All callers changed. --- src/ChangeLog | 24 +++++++++ src/dispextern.h | 2 - src/print.c | 131 +++++++++++++++++++++++------------------------ src/search.c | 28 +++++----- src/w32.c | 126 ++++++++++++++++++++++----------------------- src/xdisp.c | 72 ++++++++++++-------------- 6 files changed, 197 insertions(+), 186 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0ed011884ca..75b75ab522c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,27 @@ +2011-03-28 Juanma Barranquero + + * dispextern.h (string_buffer_position): Remove declaration. + + * print.c (strout): Remove parameter `multibyte', unused since + 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed. + + * search.c (boyer_moore): Remove parameters `len', `pos' and `lim', + never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org. + All callers changed. + + * w32.c (_wsa_errlist): Use braces for struct initializers. + + * xdisp.c (string_buffer_position_lim): Remove parameter `w', + never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org. + All callers changed. + (string_buffer_position): Likewise. Also, make static (it's never + used outside xdisp.c). + (cursor_row_p): Remove parameter `w', unused since + 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed. + (decode_mode_spec): Remove parameter `precision', introduced during + Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used. + All callers changed. + 2011-03-27 Jan Djärv * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar. diff --git a/src/dispextern.h b/src/dispextern.h index d1e0475dd15..17a9bc39fb2 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2953,8 +2953,6 @@ extern int bidi_mirror_char (int); struct glyph_row *row_containing_pos (struct window *, EMACS_INT, struct glyph_row *, struct glyph_row *, int); -EMACS_INT string_buffer_position (struct window *, Lisp_Object, - EMACS_INT); int line_bottom_y (struct it *); int display_prop_intangible_p (Lisp_Object); void resize_echo_area_exactly (void); diff --git a/src/print.c b/src/print.c index 5b2778cf251..e44d4d14f36 100644 --- a/src/print.c +++ b/src/print.c @@ -273,7 +273,7 @@ printchar (unsigned int ch, Lisp_Object fun) static void strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte, - Lisp_Object printcharfun, int multibyte) + Lisp_Object printcharfun) { if (size < 0) size_byte = size = strlen (ptr); @@ -406,16 +406,13 @@ print_string (Lisp_Object string, Lisp_Object printcharfun) SAFE_ALLOCA (buffer, char *, nbytes); memcpy (buffer, SDATA (string), nbytes); - strout (buffer, chars, SBYTES (string), - printcharfun, STRING_MULTIBYTE (string)); + strout (buffer, chars, SBYTES (string), printcharfun); SAFE_FREE (); } else /* No need to copy, since output to print_buffer can't GC. */ - strout (SSDATA (string), - chars, SBYTES (string), - printcharfun, STRING_MULTIBYTE (string)); + strout (SSDATA (string), chars, SBYTES (string), printcharfun); } else { @@ -472,7 +469,7 @@ write_string (const char *data, int size) printcharfun = Vstandard_output; PRINTPREPARE; - strout (data, size, size, printcharfun, 0); + strout (data, size, size, printcharfun); PRINTFINISH; } @@ -486,7 +483,7 @@ write_string_1 (const char *data, int size, Lisp_Object printcharfun) PRINTDECLARE; PRINTPREPARE; - strout (data, size, size, printcharfun, 0); + strout (data, size, size, printcharfun); PRINTFINISH; } @@ -1404,7 +1401,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag if (EQ (obj, being_printed[i])) { sprintf (buf, "#%d", i); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); return; } being_printed[print_depth] = obj; @@ -1420,7 +1417,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag { /* Add a prefix #n= if OBJ has not yet been printed; that is, its status field is nil. */ sprintf (buf, "#%d=", -n); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); /* OBJ is going to be printed. Remember that fact. */ Fputhash (obj, make_number (- n), Vprint_number_table); } @@ -1428,7 +1425,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag { /* Just print #n# if OBJ has already been printed. */ sprintf (buf, "#%d#", n); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); return; } } @@ -1446,7 +1443,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag sprintf (buf, "%ld", (long) XINT (obj)); else abort (); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); break; case Lisp_Float: @@ -1454,7 +1451,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag char pigbuf[FLOAT_TO_STRING_BUFSIZE]; float_to_string (pigbuf, XFLOAT_DATA (obj)); - strout (pigbuf, -1, -1, printcharfun, 0); + strout (pigbuf, -1, -1, printcharfun); } break; @@ -1532,7 +1529,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag sprintf (outbuf, "\\x%04x", c); need_nonhex = 1; } - strout (outbuf, -1, -1, printcharfun, 0); + strout (outbuf, -1, -1, printcharfun); } else if (! multibyte && SINGLE_BYTE_CHAR_P (c) && ! ASCII_BYTE_P (c) @@ -1544,7 +1541,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag using octal escapes. */ char outbuf[5]; sprintf (outbuf, "\\%03o", c); - strout (outbuf, -1, -1, printcharfun, 0); + strout (outbuf, -1, -1, printcharfun); } else { @@ -1557,7 +1554,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag if ((c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') || (c >= '0' && c <= '9')) - strout ("\\ ", -1, -1, printcharfun, 0); + strout ("\\ ", -1, -1, printcharfun); } if (c == '\"' || c == '\\') @@ -1645,7 +1642,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag /* If deeper than spec'd depth, print placeholder. */ if (INTEGERP (Vprint_level) && print_depth > XINT (Vprint_level)) - strout ("...", -1, -1, printcharfun, 0); + strout ("...", -1, -1, printcharfun); else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) && (EQ (XCAR (obj), Qquote))) { @@ -1705,7 +1702,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag if (i != 0 && EQ (obj, halftail)) { sprintf (buf, " . #%d", i / 2); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); goto end_of_list; } } @@ -1717,7 +1714,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil); if (INTEGERP (num)) { - strout (" . ", 3, 3, printcharfun, 0); + strout (" . ", 3, 3, printcharfun); print_object (obj, printcharfun, escapeflag); goto end_of_list; } @@ -1729,7 +1726,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag if (print_length && i > print_length) { - strout ("...", 3, 3, printcharfun, 0); + strout ("...", 3, 3, printcharfun); goto end_of_list; } @@ -1744,7 +1741,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag /* OBJ non-nil here means it's the end of a dotted list. */ if (!NILP (obj)) { - strout (" . ", 3, 3, printcharfun, 0); + strout (" . ", 3, 3, printcharfun); print_object (obj, printcharfun, escapeflag); } @@ -1758,7 +1755,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag { if (escapeflag) { - strout ("#name, printcharfun); PRINTCHAR ('>'); } @@ -1779,7 +1776,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag PRINTCHAR ('#'); PRINTCHAR ('&'); sprintf (buf, "%ld", (long) XBOOL_VECTOR (obj)->size); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); PRINTCHAR ('\"'); /* Don't print more characters than the specified maximum. @@ -1824,18 +1821,18 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag } else if (SUBRP (obj)) { - strout ("#symbol_name, -1, -1, printcharfun, 0); + strout ("#symbol_name, -1, -1, printcharfun); PRINTCHAR ('>'); } else if (WINDOWP (obj)) { - strout ("#sequence_number)); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); if (!NILP (XWINDOW (obj)->buffer)) { - strout (" on ", -1, -1, printcharfun, 0); + strout (" on ", -1, -1, printcharfun); print_string (BVAR (XBUFFER (XWINDOW (obj)->buffer), name), printcharfun); } PRINTCHAR ('>'); @@ -1843,13 +1840,13 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag else if (TERMINALP (obj)) { struct terminal *t = XTERMINAL (obj); - strout ("#id); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); if (t->name) { - strout (" on ", -1, -1, printcharfun, 0); - strout (t->name, -1, -1, printcharfun, 0); + strout (" on ", -1, -1, printcharfun); + strout (t->name, -1, -1, printcharfun); } PRINTCHAR ('>'); } @@ -1859,21 +1856,21 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag int i; EMACS_INT real_size, size; #if 0 - strout ("#test)) { PRINTCHAR (' '); PRINTCHAR ('\''); - strout (SDATA (SYMBOL_NAME (h->test)), -1, -1, printcharfun, 0); + strout (SDATA (SYMBOL_NAME (h->test)), -1, -1, printcharfun); PRINTCHAR (' '); - strout (SDATA (SYMBOL_NAME (h->weak)), -1, -1, printcharfun, 0); + strout (SDATA (SYMBOL_NAME (h->weak)), -1, -1, printcharfun); PRINTCHAR (' '); sprintf (buf, "%ld/%ld", (long) h->count, (long) XVECTOR (h->next)->size); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); } sprintf (buf, " 0x%lx", (unsigned long) h); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); PRINTCHAR ('>'); #endif /* Implement a readable output, e.g.: @@ -1881,33 +1878,33 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag /* Always print the size. */ sprintf (buf, "#s(hash-table size %ld", (long) XVECTOR (h->next)->size); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); if (!NILP (h->test)) { - strout (" test ", -1, -1, printcharfun, 0); + strout (" test ", -1, -1, printcharfun); print_object (h->test, printcharfun, escapeflag); } if (!NILP (h->weak)) { - strout (" weakness ", -1, -1, printcharfun, 0); + strout (" weakness ", -1, -1, printcharfun); print_object (h->weak, printcharfun, escapeflag); } if (!NILP (h->rehash_size)) { - strout (" rehash-size ", -1, -1, printcharfun, 0); + strout (" rehash-size ", -1, -1, printcharfun); print_object (h->rehash_size, printcharfun, escapeflag); } if (!NILP (h->rehash_threshold)) { - strout (" rehash-threshold ", -1, -1, printcharfun, 0); + strout (" rehash-threshold ", -1, -1, printcharfun); print_object (h->rehash_threshold, printcharfun, escapeflag); } - strout (" data ", -1, -1, printcharfun, 0); + strout (" data ", -1, -1, printcharfun); /* Print the data here as a plist. */ real_size = HASH_TABLE_SIZE (h); @@ -1929,7 +1926,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag } if (size < real_size) - strout (" ...", 4, 4, printcharfun, 0); + strout (" ...", 4, 4, printcharfun); PRINTCHAR (')'); PRINTCHAR (')'); @@ -1938,10 +1935,10 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag else if (BUFFERP (obj)) { if (NILP (BVAR (XBUFFER (obj), name))) - strout ("#", -1, -1, printcharfun, 0); + strout ("#", -1, -1, printcharfun); else if (escapeflag) { - strout ("#'); } @@ -1950,16 +1947,16 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag } else if (WINDOW_CONFIGURATIONP (obj)) { - strout ("#", -1, -1, printcharfun, 0); + strout ("#", -1, -1, printcharfun); } else if (FRAMEP (obj)) { strout ((FRAME_LIVE_P (XFRAME (obj)) ? "#name, printcharfun); sprintf (buf, " 0x%lx", (unsigned long) (XFRAME (obj))); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); PRINTCHAR ('>'); } else if (FONTP (obj)) @@ -1969,9 +1966,9 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag if (! FONT_OBJECT_P (obj)) { if (FONT_SPEC_P (obj)) - strout ("#insertion_type != 0) - strout ("(moves after insertion) ", -1, -1, printcharfun, 0); + strout ("(moves after insertion) ", -1, -1, printcharfun); if (! XMARKER (obj)->buffer) - strout ("in no buffer", -1, -1, printcharfun, 0); + strout ("in no buffer", -1, -1, printcharfun); else { sprintf (buf, "at %ld", (long)marker_position (obj)); - strout (buf, -1, -1, printcharfun, 0); - strout (" in ", -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); + strout (" in ", -1, -1, printcharfun); print_string (BVAR (XMARKER (obj)->buffer, name), printcharfun); } PRINTCHAR ('>'); break; case Lisp_Misc_Overlay: - strout ("#buffer) - strout ("in no buffer", -1, -1, printcharfun, 0); + strout ("in no buffer", -1, -1, printcharfun); else { sprintf (buf, "from %ld to %ld in ", (long)marker_position (OVERLAY_START (obj)), (long)marker_position (OVERLAY_END (obj))); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); print_string (BVAR (XMARKER (OVERLAY_START (obj))->buffer, name), printcharfun); } @@ -2082,15 +2079,15 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag /* Remaining cases shouldn't happen in normal usage, but let's print them anyway for the benefit of the debugger. */ case Lisp_Misc_Free: - strout ("#", -1, -1, printcharfun, 0); + strout ("#", -1, -1, printcharfun); break; case Lisp_Misc_Save_Value: - strout ("#pointer, XSAVE_VALUE (obj)->integer); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); PRINTCHAR ('>'); break; @@ -2104,16 +2101,16 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag { /* We're in trouble if this happens! Probably should just abort () */ - strout ("#size); else sprintf (buf, "(0x%02x)", (int) XTYPE (obj)); - strout (buf, -1, -1, printcharfun, 0); + strout (buf, -1, -1, printcharfun); strout (" Save your buffers immediately and please report this bug>", - -1, -1, printcharfun, 0); + -1, -1, printcharfun); } } diff --git a/src/search.c b/src/search.c index bf93a7fe442..59a530eff61 100644 --- a/src/search.c +++ b/src/search.c @@ -95,10 +95,9 @@ static void save_search_regs (void); static EMACS_INT simple_search (EMACS_INT, unsigned char *, EMACS_INT, EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT); -static EMACS_INT boyer_moore (EMACS_INT, unsigned char *, EMACS_INT, EMACS_INT, - Lisp_Object, Lisp_Object, - EMACS_INT, EMACS_INT, - EMACS_INT, EMACS_INT, int); +static EMACS_INT boyer_moore (EMACS_INT, unsigned char *, EMACS_INT, + Lisp_Object, Lisp_Object, EMACS_INT, + EMACS_INT, int); static EMACS_INT search_buffer (Lisp_Object, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, int, Lisp_Object, Lisp_Object, int); @@ -1416,15 +1415,14 @@ search_buffer (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte, } len_byte = pat - patbuf; - len = raw_pattern_size; pat = base_pat = patbuf; if (boyer_moore_ok) - return boyer_moore (n, pat, len, len_byte, trt, inverse_trt, - pos, pos_byte, lim, lim_byte, + return boyer_moore (n, pat, len_byte, trt, inverse_trt, + pos_byte, lim_byte, char_base); else - return simple_search (n, pat, len, len_byte, trt, + return simple_search (n, pat, raw_pattern_size, len_byte, trt, pos, pos_byte, lim, lim_byte); } } @@ -1636,8 +1634,8 @@ simple_search (EMACS_INT n, unsigned char *pat, } /* Do Boyer-Moore search N times for the string BASE_PAT, - whose length is LEN/LEN_BYTE, - from buffer position POS/POS_BYTE until LIM/LIM_BYTE. + whose length is LEN_BYTE, + from buffer position POS_BYTE until LIM_BYTE. DIRECTION says which direction we search in. TRT and INVERSE_TRT are translation tables. Characters in PAT are already translated by TRT. @@ -1652,10 +1650,10 @@ simple_search (EMACS_INT n, unsigned char *pat, static EMACS_INT boyer_moore (EMACS_INT n, unsigned char *base_pat, - EMACS_INT len, EMACS_INT len_byte, + EMACS_INT len_byte, Lisp_Object trt, Lisp_Object inverse_trt, - EMACS_INT pos, EMACS_INT pos_byte, - EMACS_INT lim, EMACS_INT lim_byte, int char_base) + EMACS_INT pos_byte, EMACS_INT lim_byte, + int char_base) { int direction = ((n > 0) ? 1 : -1); register EMACS_INT dirlen; @@ -1776,8 +1774,8 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat, stride_for_teases = BM_tab[j]; BM_tab[j] = dirlen - i; - /* A translation table is accompanied by its inverse -- see */ - /* comment following downcase_table for details */ + /* A translation table is accompanied by its inverse -- see + comment following downcase_table for details. */ if (ch >= 0) { int starting_ch = ch; diff --git a/src/w32.c b/src/w32.c index 5643b3f073e..495f878d3a8 100644 --- a/src/w32.c +++ b/src/w32.c @@ -4517,75 +4517,75 @@ struct { int errnum; char * msg; } _wsa_errlist[] = { - WSAEINTR , "Interrupted function call", - WSAEBADF , "Bad file descriptor", - WSAEACCES , "Permission denied", - WSAEFAULT , "Bad address", - WSAEINVAL , "Invalid argument", - WSAEMFILE , "Too many open files", + {WSAEINTR , "Interrupted function call"}, + {WSAEBADF , "Bad file descriptor"}, + {WSAEACCES , "Permission denied"}, + {WSAEFAULT , "Bad address"}, + {WSAEINVAL , "Invalid argument"}, + {WSAEMFILE , "Too many open files"}, - WSAEWOULDBLOCK , "Resource temporarily unavailable", - WSAEINPROGRESS , "Operation now in progress", - WSAEALREADY , "Operation already in progress", - WSAENOTSOCK , "Socket operation on non-socket", - WSAEDESTADDRREQ , "Destination address required", - WSAEMSGSIZE , "Message too long", - WSAEPROTOTYPE , "Protocol wrong type for socket", - WSAENOPROTOOPT , "Bad protocol option", - WSAEPROTONOSUPPORT , "Protocol not supported", - WSAESOCKTNOSUPPORT , "Socket type not supported", - WSAEOPNOTSUPP , "Operation not supported", - WSAEPFNOSUPPORT , "Protocol family not supported", - WSAEAFNOSUPPORT , "Address family not supported by protocol family", - WSAEADDRINUSE , "Address already in use", - WSAEADDRNOTAVAIL , "Cannot assign requested address", - WSAENETDOWN , "Network is down", - WSAENETUNREACH , "Network is unreachable", - WSAENETRESET , "Network dropped connection on reset", - WSAECONNABORTED , "Software caused connection abort", - WSAECONNRESET , "Connection reset by peer", - WSAENOBUFS , "No buffer space available", - WSAEISCONN , "Socket is already connected", - WSAENOTCONN , "Socket is not connected", - WSAESHUTDOWN , "Cannot send after socket shutdown", - WSAETOOMANYREFS , "Too many references", /* not sure */ - WSAETIMEDOUT , "Connection timed out", - WSAECONNREFUSED , "Connection refused", - WSAELOOP , "Network loop", /* not sure */ - WSAENAMETOOLONG , "Name is too long", - WSAEHOSTDOWN , "Host is down", - WSAEHOSTUNREACH , "No route to host", - WSAENOTEMPTY , "Buffer not empty", /* not sure */ - WSAEPROCLIM , "Too many processes", - WSAEUSERS , "Too many users", /* not sure */ - WSAEDQUOT , "Double quote in host name", /* really not sure */ - WSAESTALE , "Data is stale", /* not sure */ - WSAEREMOTE , "Remote error", /* not sure */ + {WSAEWOULDBLOCK , "Resource temporarily unavailable"}, + {WSAEINPROGRESS , "Operation now in progress"}, + {WSAEALREADY , "Operation already in progress"}, + {WSAENOTSOCK , "Socket operation on non-socket"}, + {WSAEDESTADDRREQ , "Destination address required"}, + {WSAEMSGSIZE , "Message too long"}, + {WSAEPROTOTYPE , "Protocol wrong type for socket"}, + {WSAENOPROTOOPT , "Bad protocol option"}, + {WSAEPROTONOSUPPORT , "Protocol not supported"}, + {WSAESOCKTNOSUPPORT , "Socket type not supported"}, + {WSAEOPNOTSUPP , "Operation not supported"}, + {WSAEPFNOSUPPORT , "Protocol family not supported"}, + {WSAEAFNOSUPPORT , "Address family not supported by protocol family"}, + {WSAEADDRINUSE , "Address already in use"}, + {WSAEADDRNOTAVAIL , "Cannot assign requested address"}, + {WSAENETDOWN , "Network is down"}, + {WSAENETUNREACH , "Network is unreachable"}, + {WSAENETRESET , "Network dropped connection on reset"}, + {WSAECONNABORTED , "Software caused connection abort"}, + {WSAECONNRESET , "Connection reset by peer"}, + {WSAENOBUFS , "No buffer space available"}, + {WSAEISCONN , "Socket is already connected"}, + {WSAENOTCONN , "Socket is not connected"}, + {WSAESHUTDOWN , "Cannot send after socket shutdown"}, + {WSAETOOMANYREFS , "Too many references"}, /* not sure */ + {WSAETIMEDOUT , "Connection timed out"}, + {WSAECONNREFUSED , "Connection refused"}, + {WSAELOOP , "Network loop"}, /* not sure */ + {WSAENAMETOOLONG , "Name is too long"}, + {WSAEHOSTDOWN , "Host is down"}, + {WSAEHOSTUNREACH , "No route to host"}, + {WSAENOTEMPTY , "Buffer not empty"}, /* not sure */ + {WSAEPROCLIM , "Too many processes"}, + {WSAEUSERS , "Too many users"}, /* not sure */ + {WSAEDQUOT , "Double quote in host name"}, /* really not sure */ + {WSAESTALE , "Data is stale"}, /* not sure */ + {WSAEREMOTE , "Remote error"}, /* not sure */ - WSASYSNOTREADY , "Network subsystem is unavailable", - WSAVERNOTSUPPORTED , "WINSOCK.DLL version out of range", - WSANOTINITIALISED , "Winsock not initialized successfully", - WSAEDISCON , "Graceful shutdown in progress", + {WSASYSNOTREADY , "Network subsystem is unavailable"}, + {WSAVERNOTSUPPORTED , "WINSOCK.DLL version out of range"}, + {WSANOTINITIALISED , "Winsock not initialized successfully"}, + {WSAEDISCON , "Graceful shutdown in progress"}, #ifdef WSAENOMORE - WSAENOMORE , "No more operations allowed", /* not sure */ - WSAECANCELLED , "Operation cancelled", /* not sure */ - WSAEINVALIDPROCTABLE , "Invalid procedure table from service provider", - WSAEINVALIDPROVIDER , "Invalid service provider version number", - WSAEPROVIDERFAILEDINIT , "Unable to initialize a service provider", - WSASYSCALLFAILURE , "System call failure", - WSASERVICE_NOT_FOUND , "Service not found", /* not sure */ - WSATYPE_NOT_FOUND , "Class type not found", - WSA_E_NO_MORE , "No more resources available", /* really not sure */ - WSA_E_CANCELLED , "Operation already cancelled", /* really not sure */ - WSAEREFUSED , "Operation refused", /* not sure */ + {WSAENOMORE , "No more operations allowed"}, /* not sure */ + {WSAECANCELLED , "Operation cancelled"}, /* not sure */ + {WSAEINVALIDPROCTABLE , "Invalid procedure table from service provider"}, + {WSAEINVALIDPROVIDER , "Invalid service provider version number"}, + {WSAEPROVIDERFAILEDINIT , "Unable to initialize a service provider"}, + {WSASYSCALLFAILURE , "System call failure"}, + {WSASERVICE_NOT_FOUND , "Service not found"}, /* not sure */ + {WSATYPE_NOT_FOUND , "Class type not found"}, + {WSA_E_NO_MORE , "No more resources available"}, /* really not sure */ + {WSA_E_CANCELLED , "Operation already cancelled"}, /* really not sure */ + {WSAEREFUSED , "Operation refused"}, /* not sure */ #endif - WSAHOST_NOT_FOUND , "Host not found", - WSATRY_AGAIN , "Authoritative host not found during name lookup", - WSANO_RECOVERY , "Non-recoverable error during name lookup", - WSANO_DATA , "Valid name, no data record of requested type", + {WSAHOST_NOT_FOUND , "Host not found"}, + {WSATRY_AGAIN , "Authoritative host not found during name lookup"}, + {WSANO_RECOVERY , "Non-recoverable error during name lookup"}, + {WSANO_DATA , "Valid name, no data record of requested type"}, - -1, NULL + {-1, NULL} }; char * diff --git a/src/xdisp.c b/src/xdisp.c index 6f9f56df979..148c7bc5ec6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -754,7 +754,7 @@ static void setup_for_ellipsis (struct it *, int); static void mark_window_display_accurate_1 (struct window *, int); static int single_display_spec_string_p (Lisp_Object, Lisp_Object); static int display_prop_string_p (Lisp_Object, Lisp_Object); -static int cursor_row_p (struct window *, struct glyph_row *); +static int cursor_row_p (struct glyph_row *); static int redisplay_mode_lines (Lisp_Object, int); static char *decode_mode_spec_coding (Lisp_Object, char *, int); @@ -823,8 +823,7 @@ static int display_mode_lines (struct window *); static int display_mode_line (struct window *, enum face_id, Lisp_Object); static int display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_Object, int); static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object); -static const char *decode_mode_spec (struct window *, int, int, int, - Lisp_Object *); +static const char *decode_mode_spec (struct window *, int, int, Lisp_Object *); static void display_menu_bar (struct window *); static int display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT, int, EMACS_INT *); @@ -4420,20 +4419,18 @@ display_prop_string_p (Lisp_Object prop, Lisp_Object string) return 0; } -/* Look for STRING in overlays and text properties in W's buffer, - between character positions FROM and TO (excluding TO). +/* Look for STRING in overlays and text properties in the current + buffer, between character positions FROM and TO (excluding TO). BACK_P non-zero means look back (in this case, TO is supposed to be less than FROM). Value is the first character position where STRING was found, or zero if it wasn't found before hitting TO. - W's buffer must be current. - This function may only use code that doesn't eval because it is called asynchronously from note_mouse_highlight. */ static EMACS_INT -string_buffer_position_lim (struct window *w, Lisp_Object string, +string_buffer_position_lim (Lisp_Object string, EMACS_INT from, EMACS_INT to, int back_p) { Lisp_Object limit, prop, pos; @@ -4471,27 +4468,25 @@ string_buffer_position_lim (struct window *w, Lisp_Object string, return found ? XINT (pos) : 0; } -/* Determine which buffer position in W's buffer STRING comes from. +/* Determine which buffer position in current buffer STRING comes from. AROUND_CHARPOS is an approximate position where it could come from. Value is the buffer position or 0 if it couldn't be determined. - W's buffer must be current. - This function is necessary because we don't record buffer positions in glyphs generated from strings (to keep struct glyph small). This function may only use code that doesn't eval because it is called asynchronously from note_mouse_highlight. */ -EMACS_INT -string_buffer_position (struct window *w, Lisp_Object string, EMACS_INT around_charpos) +static EMACS_INT +string_buffer_position (Lisp_Object string, EMACS_INT around_charpos) { const int MAX_DISTANCE = 1000; - EMACS_INT found = string_buffer_position_lim (w, string, around_charpos, + EMACS_INT found = string_buffer_position_lim (string, around_charpos, around_charpos + MAX_DISTANCE, 0); if (!found) - found = string_buffer_position_lim (w, string, around_charpos, + found = string_buffer_position_lim (string, around_charpos, around_charpos - MAX_DISTANCE, 1); return found; } @@ -12731,7 +12726,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, EMACS_INT tem; str = glyph->object; - tem = string_buffer_position_lim (w, str, pos, pos_after, 0); + tem = string_buffer_position_lim (str, pos, pos_after, 0); if (tem == 0 /* from overlay */ || pos <= tem) { @@ -13457,7 +13452,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste && row < w->current_matrix->rows + w->current_matrix->nrows - 1 && MATRIX_ROW_START_CHARPOS (row+1) == PT - && !cursor_row_p (w, row)) + && !cursor_row_p (row)) ++row; /* If within the scroll margin, scroll. Note that @@ -13509,7 +13504,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste skip forward over overlay strings. */ while (MATRIX_ROW_BOTTOM_Y (row) < last_y && MATRIX_ROW_END_CHARPOS (row) == PT - && !cursor_row_p (w, row)) + && !cursor_row_p (row)) ++row; /* If within the scroll margin, scroll. */ @@ -13605,7 +13600,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste { if (MATRIX_ROW_START_CHARPOS (row) <= PT && PT <= MATRIX_ROW_END_CHARPOS (row) - && cursor_row_p (w, row)) + && cursor_row_p (row)) rv |= set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); /* As soon as we've found the first suitable row @@ -13644,7 +13639,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste } while (MATRIX_ROW_BOTTOM_Y (row) < last_y && MATRIX_ROW_START_CHARPOS (row) == PT - && cursor_row_p (w, row)); + && cursor_row_p (row)); } } } @@ -16971,11 +16966,11 @@ highlight_trailing_whitespace (struct frame *f, struct glyph_row *row) } -/* Value is non-zero if glyph row ROW in window W should be +/* Value is non-zero if glyph row ROW should be used to hold the cursor. */ static int -cursor_row_p (struct window *w, struct glyph_row *row) +cursor_row_p (struct glyph_row *row) { int result = 1; @@ -17888,7 +17883,7 @@ display_line (struct it *it) && !MATRIX_ROW (it->w->desired_matrix, cvpos)->ends_at_zv_p)) && PT >= MATRIX_ROW_START_CHARPOS (row) && PT <= MATRIX_ROW_END_CHARPOS (row) - && cursor_row_p (it->w, row)) + && cursor_row_p (row)) set_cursor_from_row (it->w, row, it->w->desired_matrix, 0, 0, 0, 0); /* Highlight trailing whitespace. */ @@ -18540,7 +18535,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, charpos = (STRING_MULTIBYTE (elt) ? string_byte_to_char (elt, bytepos) : bytepos); - spec = decode_mode_spec (it->w, c, field, prec, &string); + spec = decode_mode_spec (it->w, c, field, &string); multibyte = STRINGP (string) && STRING_MULTIBYTE (string); switch (mode_line_target) @@ -19211,9 +19206,8 @@ decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_ } /* Return a string for the output of a mode line %-spec for window W, - generated by character C. PRECISION >= 0 means don't return a - string longer than that value. FIELD_WIDTH > 0 means pad the - string returned with spaces to that value. Return a Lisp string in + generated by character C. FIELD_WIDTH > 0 means pad the string + returned with spaces to that value. Return a Lisp string in *STRING if the resulting string is taken from that Lisp string. Note we operate on the current buffer for most purposes, @@ -19223,7 +19217,7 @@ static char lots_of_dashes[] = "------------------------------------------------ static const char * decode_mode_spec (struct window *w, register int c, int field_width, - int precision, Lisp_Object *string) + Lisp_Object *string) { Lisp_Object obj; struct frame *f = XFRAME (WINDOW_FRAME (w)); @@ -24324,7 +24318,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, END_CHARPOS, or if they come from an overlay. */ if (EQ (glyph->object, before_string)) { - pos = string_buffer_position (w, before_string, + pos = string_buffer_position (before_string, start_charpos); /* If pos == 0, it means before_string came from an overlay, not from a buffer position. */ @@ -24333,7 +24327,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, } else if (EQ (glyph->object, after_string)) { - pos = string_buffer_position (w, after_string, end_charpos); + pos = string_buffer_position (after_string, end_charpos); if (!pos || (pos >= start_charpos && pos < end_charpos)) break; } @@ -24375,7 +24369,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, END_CHARPOS, or if they come from an overlay. */ if (EQ (glyph->object, before_string)) { - pos = string_buffer_position (w, before_string, start_charpos); + pos = string_buffer_position (before_string, start_charpos); /* If pos == 0, it means before_string came from an overlay, not from a buffer position. */ if (!pos || (pos >= start_charpos && pos < end_charpos)) @@ -24383,7 +24377,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, } else if (EQ (glyph->object, after_string)) { - pos = string_buffer_position (w, after_string, end_charpos); + pos = string_buffer_position (after_string, end_charpos); if (!pos || (pos >= start_charpos && pos < end_charpos)) break; } @@ -24441,13 +24435,13 @@ mouse_face_from_buffer_pos (Lisp_Object window, END_CHARPOS, or if they come from an overlay. */ if (EQ (end->object, before_string)) { - pos = string_buffer_position (w, before_string, start_charpos); + pos = string_buffer_position (before_string, start_charpos); if (!pos || (pos >= start_charpos && pos < end_charpos)) break; } else if (EQ (end->object, after_string)) { - pos = string_buffer_position (w, after_string, end_charpos); + pos = string_buffer_position (after_string, end_charpos); if (!pos || (pos >= start_charpos && pos < end_charpos)) break; } @@ -24491,13 +24485,13 @@ mouse_face_from_buffer_pos (Lisp_Object window, END_CHARPOS, or if they come from an overlay. */ if (EQ (end->object, before_string)) { - pos = string_buffer_position (w, before_string, start_charpos); + pos = string_buffer_position (before_string, start_charpos); if (!pos || (pos >= start_charpos && pos < end_charpos)) break; } else if (EQ (end->object, after_string)) { - pos = string_buffer_position (w, after_string, end_charpos); + pos = string_buffer_position (after_string, end_charpos); if (!pos || (pos >= start_charpos && pos < end_charpos)) break; } @@ -25481,7 +25475,7 @@ note_mouse_highlight (struct frame *f, int x, int y) check if the text under it has one. */ struct glyph_row *r = MATRIX_ROW (w->current_matrix, vpos); EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); - pos = string_buffer_position (w, object, start); + pos = string_buffer_position (object, start); if (pos > 0) { mouse_face = get_char_property_and_overlay @@ -25591,7 +25585,7 @@ note_mouse_highlight (struct frame *f, int x, int y) struct glyph_row *r = MATRIX_ROW (w->current_matrix, vpos); EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); - EMACS_INT p = string_buffer_position (w, obj, start); + EMACS_INT p = string_buffer_position (obj, start); if (p > 0) { help = Fget_char_property (make_number (p), @@ -25647,7 +25641,7 @@ note_mouse_highlight (struct frame *f, int x, int y) struct glyph_row *r = MATRIX_ROW (w->current_matrix, vpos); EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); - EMACS_INT p = string_buffer_position (w, obj, start); + EMACS_INT p = string_buffer_position (obj, start); if (p > 0) pointer = Fget_char_property (make_number (p), Qpointer, w->buffer); From 947b656632a76ebb01eda0550c34b1ac43684a98 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 28 Mar 2011 22:34:32 +0800 Subject: [PATCH 146/166] Place empty abbrev tables after nonempty ones when editing --- lisp/ChangeLog | 6 ++++++ lisp/abbrev.el | 22 ++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a8838161136..9eeac0d2155 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-28 Leo Liu + + * abbrev.el (abbrev-table-empty-p): New function. + (prepare-abbrev-list-buffer): Place empty abbrev tables after + nonempty ones. (Bug#5937) + 2011-03-27 Jan Djärv * cus-start.el (all): Add boolean ns-auto-hide-menu-bar. diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 3b383a5f5b8..504d9fcbbce 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -123,8 +123,13 @@ Otherwise display all abbrevs." (if local (insert-abbrev-table-description (abbrev-table-name local-table) t) - (dolist (table abbrev-table-name-list) - (insert-abbrev-table-description table t))) + (let (empty-tables) + (dolist (table abbrev-table-name-list) + (if (abbrev-table-empty-p (symbol-value table)) + (push table empty-tables) + (insert-abbrev-table-description table t))) + (dolist (table (nreverse empty-tables)) + (insert-abbrev-table-description table t)))) (goto-char (point-min)) (set-buffer-modified-p nil) (edit-abbrevs-mode) @@ -420,6 +425,19 @@ PROPS is a list of properties." (and (vectorp object) (numberp (abbrev-table-get object :abbrev-table-modiff)))) +(defun abbrev-table-empty-p (object &optional ignore-system) + "Return nil if there are no abbrev symbols in OBJECT. +If IGNORE-SYSTEM is non-nil, system definitions are ignored." + (unless (abbrev-table-p object) + (error "Non abbrev table object")) + (not (catch 'some + (mapatoms (lambda (abbrev) + (unless (or (zerop (length (symbol-name abbrev))) + (and ignore-system + (abbrev-get abbrev :system))) + (throw 'some t))) + object)))) + (defvar global-abbrev-table (make-abbrev-table) "The abbrev table whose abbrevs affect all buffers. Each buffer may also have a local abbrev table. From f6d6298639ae43539581c2079666d76a54f1557e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 28 Mar 2011 16:26:35 -0400 Subject: [PATCH 147/166] Don't reset post-command-hook to nil upon error. * src/eval.c (enum run_hooks_condition): Remove. (funcall_nil, funcall_not): New functions. (run_hook_with_args): Call each function through a `funcall' argument. Remove `cond' argument, now redundant. (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success) (Frun_hook_with_args_until_failure): Adjust accordingly. (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions. * src/keyboard.c (safe_run_hook_funcall): New function. (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error, don't set the hook to nil, but remove the offending function instead. (Qcommand_hook_internal): Remove, unused. (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define Vcommand_hook_internal. * doc/lispref/commands.texi (Command Overview): post-command-hook is not reset to nil any more. --- doc/lispref/ChangeLog | 5 ++ doc/lispref/commands.texi | 5 +- etc/NEWS | 5 ++ src/ChangeLog | 17 +++++ src/eval.c | 155 ++++++++++++++++++++++---------------- src/keyboard.c | 82 ++++++++++++++------ src/lisp.h | 7 +- 7 files changed, 187 insertions(+), 89 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index c705aae4934..1eb3cfa2556 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2011-03-28 Stefan Monnier + + * commands.texi (Command Overview): post-command-hook is not reset to + nil any more. + 2011-03-19 Stefan Monnier * strings.texi (String Conversion): Don't mention diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 4f8d554a68b..eb42ddb11a4 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -91,8 +91,9 @@ and also when the command loop is first entered. At that time, Quitting is suppressed while running @code{pre-command-hook} and @code{post-command-hook}. If an error happens while executing one of -these hooks, it terminates execution of the hook, and clears the hook -variable to @code{nil} so as to prevent an infinite loop of errors. +these hooks, it does not terminate execution of the hook; instead +the error is silenced and the function in which the error occurred +is removed from the hook. A request coming into the Emacs server (@pxref{Emacs Server,,, emacs, The GNU Emacs Manual}) runs these two hooks just as a keyboard diff --git a/etc/NEWS b/etc/NEWS index c48af3a3b40..969b1cdcf5f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -748,6 +748,11 @@ sc.el, x-menu.el, rnews.el, rnewspost.el * Lisp changes in Emacs 24.1 +** pre/post-command-hook are not reset to nil upon error. +Instead, the offending function is removed. + +** New low-level function run-hook-wrapped. + ** byte-compile-disable-print-circle is obsolete. ** deferred-action-list and deferred-action-function are obsolete. ** Removed the stack-trace-on-error variable. diff --git a/src/ChangeLog b/src/ChangeLog index 75b75ab522c..be55ef369b3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,20 @@ +2011-03-28 Stefan Monnier + + * keyboard.c (safe_run_hook_funcall): New function. + (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error, + don't set the hook to nil, but remove the offending function instead. + (Qcommand_hook_internal): Remove, unused. + (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define + Vcommand_hook_internal. + + * eval.c (enum run_hooks_condition): Remove. + (funcall_nil, funcall_not): New functions. + (run_hook_with_args): Call each function through a `funcall' argument. + Remove `cond' argument, now redundant. + (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success) + (Frun_hook_with_args_until_failure): Adjust accordingly. + (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions. + 2011-03-28 Juanma Barranquero * dispextern.h (string_buffer_position): Remove declaration. diff --git a/src/eval.c b/src/eval.c index f68274e6e8c..75874367f2c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -30,19 +30,19 @@ along with GNU Emacs. If not, see . */ #include "xterm.h" #endif -/* This definition is duplicated in alloc.c and keyboard.c */ -/* Putting it in lisp.h makes cc bomb out! */ +/* This definition is duplicated in alloc.c and keyboard.c. */ +/* Putting it in lisp.h makes cc bomb out! */ struct backtrace { struct backtrace *next; Lisp_Object *function; - Lisp_Object *args; /* Points to vector of args. */ + Lisp_Object *args; /* Points to vector of args. */ int nargs; /* Length of vector. If nargs is UNEVALLED, args points to slot holding - list of unevalled args */ + list of unevalled args. */ char evalargs; - /* Nonzero means call value of debugger when done with this operation. */ + /* Nonzero means call value of debugger when done with this operation. */ char debug_on_exit; }; @@ -146,7 +146,7 @@ init_eval (void) when_entered_debugger = -1; } -/* unwind-protect function used by call_debugger. */ +/* Unwind-protect function used by call_debugger. */ static Lisp_Object restore_stack_limits (Lisp_Object data) @@ -556,7 +556,7 @@ interactive_p (int exclude_subrs_p) || btp->nargs == UNEVALLED)) btp = btp->next; - /* btp now points at the frame of the innermost function that isn't + /* `btp' now points at the frame of the innermost function that isn't a special form, ignoring frames for Finteractive_p and/or Fbytecode at the top. If this frame is for a built-in function (such as load or eval-region) return nil. */ @@ -564,7 +564,7 @@ interactive_p (int exclude_subrs_p) if (exclude_subrs_p && SUBRP (fun)) return 0; - /* btp points to the frame of a Lisp function that called interactive-p. + /* `btp' points to the frame of a Lisp function that called interactive-p. Return t if that function was called interactively. */ if (btp && btp->next && EQ (*btp->next->function, Qcall_interactively)) return 1; @@ -965,11 +965,11 @@ usage: (let VARLIST BODY...) */) varlist = Fcar (args); - /* Make space to hold the values to give the bound variables */ + /* Make space to hold the values to give the bound variables. */ elt = Flength (varlist); SAFE_ALLOCA_LISP (temps, XFASTINT (elt)); - /* Compute the values and store them in `temps' */ + /* Compute the values and store them in `temps'. */ GCPRO2 (args, *temps); gcpro2.nvars = 0; @@ -1072,7 +1072,7 @@ definitions to shadow the loaded ones for use in file byte-compilation. */) /* SYM is not mentioned in ENVIRONMENT. Look at its function definition. */ if (EQ (def, Qunbound) || !CONSP (def)) - /* Not defined or definition not suitable */ + /* Not defined or definition not suitable. */ break; if (EQ (XCAR (def), Qautoload)) { @@ -1213,10 +1213,7 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value) byte_stack_list = catch->byte_stack; gcprolist = catch->gcpro; #ifdef DEBUG_GCPRO - if (gcprolist != 0) - gcpro_level = gcprolist->level + 1; - else - gcpro_level = 0; + gcpro_level = gcprolist ? gcprolist->level + 1 : gcpro_level = 0; #endif backtrace_list = catch->backlist; lisp_eval_depth = catch->lisp_eval_depth; @@ -1824,7 +1821,7 @@ maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data) ? debug_on_quit : wants_debugger (Vdebug_on_error, conditions)) && ! skip_debugger (conditions, combined_data) - /* rms: what's this for? */ + /* RMS: What's this for? */ && when_entered_debugger < num_nonmacro_input_events) { call_debugger (Fcons (Qerror, Fcons (combined_data, Qnil))); @@ -1891,7 +1888,7 @@ find_handler_clause (Lisp_Object handlers, Lisp_Object conditions, } -/* dump an error message; called like vprintf */ +/* Dump an error message; called like vprintf. */ void verror (const char *m, va_list ap) { @@ -1928,7 +1925,7 @@ verror (const char *m, va_list ap) } -/* dump an error message; called like printf */ +/* Dump an error message; called like printf. */ /* VARARGS 1 */ void @@ -2024,7 +2021,7 @@ this does nothing and returns nil. */) CHECK_SYMBOL (function); CHECK_STRING (file); - /* If function is defined and not as an autoload, don't override */ + /* If function is defined and not as an autoload, don't override. */ if (!EQ (XSYMBOL (function)->function, Qunbound) && !(CONSP (XSYMBOL (function)->function) && EQ (XCAR (XSYMBOL (function)->function), Qautoload))) @@ -2159,7 +2156,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, backtrace.next = backtrace_list; backtrace_list = &backtrace; - backtrace.function = &original_fun; /* This also protects them from gc */ + backtrace.function = &original_fun; /* This also protects them from gc. */ backtrace.args = &original_args; backtrace.nargs = UNEVALLED; backtrace.evalargs = 1; @@ -2169,7 +2166,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, do_debug_on_call (Qt); /* At this point, only original_fun and original_args - have values that will be used below */ + have values that will be used below. */ retry: /* Optimize for no indirection. */ @@ -2190,8 +2187,9 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, CHECK_CONS_LIST (); - if (XINT (numargs) < XSUBR (fun)->min_args || - (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < XINT (numargs))) + if (XINT (numargs) < XSUBR (fun)->min_args + || (XSUBR (fun)->max_args >= 0 + && XSUBR (fun)->max_args < XINT (numargs))) xsignal2 (Qwrong_number_of_arguments, original_fun, numargs); else if (XSUBR (fun)->max_args == UNEVALLED) @@ -2201,7 +2199,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, } else if (XSUBR (fun)->max_args == MANY) { - /* Pass a vector of evaluated arguments */ + /* Pass a vector of evaluated arguments. */ Lisp_Object *vals; register int argnum = 0; USE_SAFE_ALLOCA; @@ -2364,7 +2362,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) fun = indirect_function (fun); if (EQ (fun, Qunbound)) { - /* Let funcall get the error */ + /* Let funcall get the error. */ fun = args[0]; goto funcall; } @@ -2373,11 +2371,11 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) { if (numargs < XSUBR (fun)->min_args || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs)) - goto funcall; /* Let funcall get the error */ + goto funcall; /* Let funcall get the error. */ else if (XSUBR (fun)->max_args > numargs) { /* Avoid making funcall cons up a yet another new vector of arguments - by explicitly supplying nil's for optional values */ + by explicitly supplying nil's for optional values. */ SAFE_ALLOCA_LISP (funcall_args, 1 + XSUBR (fun)->max_args); for (i = numargs; i < XSUBR (fun)->max_args;) funcall_args[++i] = Qnil; @@ -2415,9 +2413,16 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) /* Run hook variables in various ways. */ -enum run_hooks_condition {to_completion, until_success, until_failure}; -static Lisp_Object run_hook_with_args (int, Lisp_Object *, - enum run_hooks_condition); +Lisp_Object run_hook_with_args (int, Lisp_Object *, + Lisp_Object (*funcall) + (int nargs, Lisp_Object *args)); + +static Lisp_Object +funcall_nil (int nargs, Lisp_Object *args) +{ + Ffuncall (nargs, args); + return Qnil; +} DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, doc: /* Run each hook in HOOKS. @@ -2442,7 +2447,7 @@ usage: (run-hooks &rest HOOKS) */) for (i = 0; i < nargs; i++) { hook[0] = args[i]; - run_hook_with_args (1, hook, to_completion); + run_hook_with_args (1, hook, funcall_nil); } return Qnil; @@ -2465,7 +2470,7 @@ Instead, use `add-hook' and specify t for the LOCAL argument. usage: (run-hook-with-args HOOK &rest ARGS) */) (int nargs, Lisp_Object *args) { - return run_hook_with_args (nargs, args, to_completion); + return run_hook_with_args (nargs, args, funcall_nil); } DEFUN ("run-hook-with-args-until-success", Frun_hook_with_args_until_success, @@ -2485,7 +2490,13 @@ Instead, use `add-hook' and specify t for the LOCAL argument. usage: (run-hook-with-args-until-success HOOK &rest ARGS) */) (int nargs, Lisp_Object *args) { - return run_hook_with_args (nargs, args, until_success); + return run_hook_with_args (nargs, args, Ffuncall); +} + +static Lisp_Object +funcall_not (int nargs, Lisp_Object *args) +{ + return NILP (Ffuncall (nargs, args)) ? Qt : Qnil; } DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, @@ -2504,21 +2515,45 @@ Instead, use `add-hook' and specify t for the LOCAL argument. usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */) (int nargs, Lisp_Object *args) { - return run_hook_with_args (nargs, args, until_failure); + return NILP (run_hook_with_args (nargs, args, funcall_not)) ? Qt : Qnil; } +static Lisp_Object +run_hook_wrapped_funcall (int nargs, Lisp_Object *args) +{ + Lisp_Object tmp = args[0], ret; + args[0] = args[1]; + args[1] = tmp; + ret = Ffuncall (nargs, args); + args[1] = args[0]; + args[0] = tmp; + return ret; +} + +DEFUN ("run-hook-wrapped", Frun_hook_wrapped, Srun_hook_wrapped, 2, MANY, 0, + doc: /* Run HOOK, passing each function through WRAP-FUNCTION. +I.e. instead of calling each function FUN directly with arguments ARGS, +it calls WRAP-FUNCTION with arguments FUN and ARGS. +As soon as a call to WRAP-FUNCTION returns non-nil, `run-hook-wrapped' +aborts and returns that value. +usage: (run-hook-wrapped HOOK WRAP-FUNCTION &rest ARGS) */) + (int nargs, Lisp_Object *args) +{ + return run_hook_with_args (nargs, args, run_hook_wrapped_funcall); +} + /* ARGS[0] should be a hook symbol. Call each of the functions in the hook value, passing each of them as arguments all the rest of ARGS (all NARGS - 1 elements). - COND specifies a condition to test after each call - to decide whether to stop. + FUNCALL specifies how to call each function on the hook. The caller (or its caller, etc) must gcpro all of ARGS, except that it isn't necessary to gcpro ARGS[0]. */ -static Lisp_Object -run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) +Lisp_Object +run_hook_with_args (int nargs, Lisp_Object *args, + Lisp_Object (*funcall) (int nargs, Lisp_Object *args)) { - Lisp_Object sym, val, ret; + Lisp_Object sym, val, ret = Qnil; struct gcpro gcpro1, gcpro2, gcpro3; /* If we are dying or still initializing, @@ -2528,14 +2563,13 @@ run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) sym = args[0]; val = find_symbol_value (sym); - ret = (cond == until_failure ? Qt : Qnil); if (EQ (val, Qunbound) || NILP (val)) return ret; else if (!CONSP (val) || EQ (XCAR (val), Qlambda)) { args[0] = val; - return Ffuncall (nargs, args); + return funcall (nargs, args); } else { @@ -2543,9 +2577,7 @@ run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) GCPRO3 (sym, val, global_vals); for (; - CONSP (val) && ((cond == to_completion) - || (cond == until_success ? NILP (ret) - : !NILP (ret))); + CONSP (val) && NILP (ret); val = XCDR (val)) { if (EQ (XCAR (val), Qt)) @@ -2558,30 +2590,26 @@ run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) if (!CONSP (global_vals) || EQ (XCAR (global_vals), Qlambda)) { args[0] = global_vals; - ret = Ffuncall (nargs, args); + ret = funcall (nargs, args); } else { for (; - (CONSP (global_vals) - && (cond == to_completion - || (cond == until_success - ? NILP (ret) - : !NILP (ret)))); + CONSP (global_vals) && NILP (ret); global_vals = XCDR (global_vals)) { args[0] = XCAR (global_vals); /* In a global value, t should not occur. If it does, we must ignore it to avoid an endless loop. */ if (!EQ (args[0], Qt)) - ret = Ffuncall (nargs, args); + ret = funcall (nargs, args); } } } else { args[0] = XCAR (val); - ret = Ffuncall (nargs, args); + ret = funcall (nargs, args); } } @@ -2603,7 +2631,7 @@ run_hook_with_args_2 (Lisp_Object hook, Lisp_Object arg1, Lisp_Object arg2) Frun_hook_with_args (3, temp); } -/* Apply fn to arg */ +/* Apply fn to arg. */ Lisp_Object apply1 (Lisp_Object fn, Lisp_Object arg) { @@ -2622,7 +2650,7 @@ apply1 (Lisp_Object fn, Lisp_Object arg) } } -/* Call function fn on no arguments */ +/* Call function fn on no arguments. */ Lisp_Object call0 (Lisp_Object fn) { @@ -2632,7 +2660,7 @@ call0 (Lisp_Object fn) RETURN_UNGCPRO (Ffuncall (1, &fn)); } -/* Call function fn with 1 argument arg1 */ +/* Call function fn with 1 argument arg1. */ /* ARGSUSED */ Lisp_Object call1 (Lisp_Object fn, Lisp_Object arg1) @@ -2647,7 +2675,7 @@ call1 (Lisp_Object fn, Lisp_Object arg1) RETURN_UNGCPRO (Ffuncall (2, args)); } -/* Call function fn with 2 arguments arg1, arg2 */ +/* Call function fn with 2 arguments arg1, arg2. */ /* ARGSUSED */ Lisp_Object call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2) @@ -2662,7 +2690,7 @@ call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2) RETURN_UNGCPRO (Ffuncall (3, args)); } -/* Call function fn with 3 arguments arg1, arg2, arg3 */ +/* Call function fn with 3 arguments arg1, arg2, arg3. */ /* ARGSUSED */ Lisp_Object call3 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) @@ -2678,7 +2706,7 @@ call3 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) RETURN_UNGCPRO (Ffuncall (4, args)); } -/* Call function fn with 4 arguments arg1, arg2, arg3, arg4 */ +/* Call function fn with 4 arguments arg1, arg2, arg3, arg4. */ /* ARGSUSED */ Lisp_Object call4 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, @@ -2696,7 +2724,7 @@ call4 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, RETURN_UNGCPRO (Ffuncall (5, args)); } -/* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5 */ +/* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5. */ /* ARGSUSED */ Lisp_Object call5 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, @@ -2715,7 +2743,7 @@ call5 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, RETURN_UNGCPRO (Ffuncall (6, args)); } -/* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6 */ +/* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6. */ /* ARGSUSED */ Lisp_Object call6 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, @@ -2735,7 +2763,7 @@ call6 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, RETURN_UNGCPRO (Ffuncall (7, args)); } -/* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7 */ +/* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7. */ /* ARGSUSED */ Lisp_Object call7 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, @@ -3079,7 +3107,7 @@ grow_specpdl (void) specpdl_ptr = specpdl + count; } -/* specpdl_ptr->symbol is a field which describes which variable is +/* `specpdl_ptr->symbol' is a field which describes which variable is let-bound, so it can be properly undone when we unbind_to. It can have the following two shapes: - SYMBOL : if it's a plain symbol, it means that we have let-bound @@ -3318,7 +3346,7 @@ Output stream used is value of `standard-output'. */) else { tem = *backlist->function; - Fprin1 (tem, Qnil); /* This can QUIT */ + Fprin1 (tem, Qnil); /* This can QUIT. */ write_string ("(", -1); if (backlist->nargs == MANY) { @@ -3588,6 +3616,7 @@ The value the function returns is not used. */); defsubr (&Srun_hook_with_args); defsubr (&Srun_hook_with_args_until_success); defsubr (&Srun_hook_with_args_until_failure); + defsubr (&Srun_hook_wrapped); defsubr (&Sfetch_bytecode); defsubr (&Sbacktrace_debug); defsubr (&Sbacktrace); diff --git a/src/keyboard.c b/src/keyboard.c index 06f375e0d9c..3fea3df07d5 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -254,7 +254,6 @@ Lisp_Object Qecho_area_clear_hook; /* Hooks to run before and after each command. */ Lisp_Object Qpre_command_hook; Lisp_Object Qpost_command_hook; -Lisp_Object Qcommand_hook_internal; Lisp_Object Qdeferred_action_function; @@ -1815,20 +1814,63 @@ adjust_point_for_property (EMACS_INT last_pt, int modified) static Lisp_Object safe_run_hooks_1 (void) { - return Frun_hooks (1, &Vinhibit_quit); + eassert (CONSP (Vinhibit_quit)); + return call0 (XCDR (Vinhibit_quit)); } -/* Subroutine for safe_run_hooks: handle an error by clearing out the hook. */ +/* Subroutine for safe_run_hooks: handle an error by clearing out the function + from the hook. */ static Lisp_Object -safe_run_hooks_error (Lisp_Object data) +safe_run_hooks_error (Lisp_Object error_data) { - Lisp_Object args[3]; - args[0] = build_string ("Error in %s: %s"); - args[1] = Vinhibit_quit; - args[2] = data; - Fmessage (3, args); - return Fset (Vinhibit_quit, Qnil); + Lisp_Object hook + = CONSP (Vinhibit_quit) ? XCAR (Vinhibit_quit) : Vinhibit_quit; + Lisp_Object fun = CONSP (Vinhibit_quit) ? XCDR (Vinhibit_quit) : Qnil; + Lisp_Object args[4]; + args[0] = build_string ("Error in %s (%s): %s"); + args[1] = hook; + args[2] = fun; + args[3] = error_data; + Fmessage (4, args); + if (SYMBOLP (hook)) + { + Lisp_Object val; + int found = 0; + Lisp_Object newval = Qnil; + for (val = find_symbol_value (hook); CONSP (val); val = XCDR (val)) + if (EQ (fun, XCAR (val))) + found = 1; + else + newval = Fcons (XCAR (val), newval); + if (found) + return Fset (hook, Fnreverse (newval)); + /* Not found in the local part of the hook. Let's look at the global + part. */ + newval = Qnil; + for (val = (NILP (Fdefault_boundp (hook)) ? Qnil + : Fdefault_value (hook)); + CONSP (val); val = XCDR (val)) + if (EQ (fun, XCAR (val))) + found = 1; + else + newval = Fcons (XCAR (val), newval); + if (found) + return Fset_default (hook, Fnreverse (newval)); + } + return Qnil; +} + +static Lisp_Object +safe_run_hook_funcall (int nargs, Lisp_Object *args) +{ + eassert (nargs == 1); + if (CONSP (Vinhibit_quit)) + XSETCDR (Vinhibit_quit, args[0]); + else + Vinhibit_quit = Fcons (Vinhibit_quit, args[0]); + + return internal_condition_case (safe_run_hooks_1, Qt, safe_run_hooks_error); } /* If we get an error while running the hook, cause the hook variable @@ -1838,10 +1880,13 @@ safe_run_hooks_error (Lisp_Object data) void safe_run_hooks (Lisp_Object hook) { + /* FIXME: our `internal_condition_case' does not provide any way to pass data + to its body or to its handlers other than via globals such as + dynamically-bound variables ;-) */ int count = SPECPDL_INDEX (); specbind (Qinhibit_quit, hook); - internal_condition_case (safe_run_hooks_1, Qt, safe_run_hooks_error); + run_hook_with_args (1, &hook, safe_run_hook_funcall); unbind_to (count, Qnil); } @@ -11438,9 +11483,6 @@ syms_of_keyboard (void) Qdeferred_action_function = intern_c_string ("deferred-action-function"); staticpro (&Qdeferred_action_function); - Qcommand_hook_internal = intern_c_string ("command-hook-internal"); - staticpro (&Qcommand_hook_internal); - Qfunction_key = intern_c_string ("function-key"); staticpro (&Qfunction_key); Qmouse_click = intern_c_string ("mouse-click"); @@ -11908,22 +11950,18 @@ Buffer modification stores t in this variable. */); Qdeactivate_mark = intern_c_string ("deactivate-mark"); staticpro (&Qdeactivate_mark); - DEFVAR_LISP ("command-hook-internal", Vcommand_hook_internal, - doc: /* Temporary storage of `pre-command-hook' or `post-command-hook'. */); - Vcommand_hook_internal = Qnil; - DEFVAR_LISP ("pre-command-hook", Vpre_command_hook, doc: /* Normal hook run before each command is executed. If an unhandled error happens in running this hook, -the hook value is set to nil, since otherwise the error -might happen repeatedly and make Emacs nonfunctional. */); +the function in which the error occurred is unconditionally removed, since +otherwise the error might happen repeatedly and make Emacs nonfunctional. */); Vpre_command_hook = Qnil; DEFVAR_LISP ("post-command-hook", Vpost_command_hook, doc: /* Normal hook run after each command is executed. If an unhandled error happens in running this hook, -the hook value is set to nil, since otherwise the error -might happen repeatedly and make Emacs nonfunctional. */); +the function in which the error occurred is unconditionally removed, since +otherwise the error might happen repeatedly and make Emacs nonfunctional. */); Vpost_command_hook = Qnil; #if 0 diff --git a/src/lisp.h b/src/lisp.h index 8c7d4da8aa9..1e255df1ecc 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2278,7 +2278,7 @@ void staticpro (Lisp_Object *); struct window; struct frame; -/* Defined in data.c */ +/* Defined in data.c. */ extern Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound; extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level; extern Lisp_Object Qerror, Qquit, Qwrong_type_argument, Qargs_out_of_range; @@ -2812,7 +2812,7 @@ extern void init_obarray (void); extern void init_lread (void); extern void syms_of_lread (void); -/* Defined in eval.c */ +/* Defined in eval.c. */ extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro; extern Lisp_Object Qinhibit_quit; extern Lisp_Object Vautoload_queue; @@ -2830,6 +2830,9 @@ EXFUN (Frun_hooks, MANY); EXFUN (Frun_hook_with_args, MANY); EXFUN (Frun_hook_with_args_until_failure, MANY); extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object); +extern Lisp_Object run_hook_with_args (int nargs, Lisp_Object *args, + Lisp_Object (*funcall) + (int nargs, Lisp_Object *args)); EXFUN (Fprogn, UNEVALLED); EXFUN (Finteractive_p, 0); EXFUN (Fthrow, 2) NO_RETURN; From 461c2ab9a5a244ec9a1b253d07c1a8bdfbd8c573 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 29 Mar 2011 00:41:01 +0200 Subject: [PATCH 148/166] src/*.c: Remove some additional unused parameters. * lisp.h (multibyte_char_to_unibyte): * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl', unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org. * character.h (CHAR_TO_BYTE8): * cmds.c (internal_self_insert): * editfns.c (general_insert_function): * keymap.c (push_key_description): * search.c (Freplace_match): * xdisp.c (message_dolog, set_message_1): All callers changed. * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end', unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org. All callers changed. --- src/ChangeLog | 18 +++++++++++++++++- src/character.c | 7 ++----- src/character.h | 2 +- src/cmds.c | 2 +- src/coding.c | 7 +++---- src/editfns.c | 2 +- src/keymap.c | 2 +- src/lisp.h | 2 +- src/search.c | 7 ++----- src/xdisp.c | 4 ++-- 10 files changed, 31 insertions(+), 22 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index be55ef369b3..1e77a6439e1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2011-03-28 Juanma Barranquero + + * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end', + unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org. + All callers changed. + + * lisp.h (multibyte_char_to_unibyte): + * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl', + unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org. + * character.h (CHAR_TO_BYTE8): + * cmds.c (internal_self_insert): + * editfns.c (general_insert_function): + * keymap.c (push_key_description): + * search.c (Freplace_match): + * xdisp.c (message_dolog, set_message_1): All callers changed. + 2011-03-28 Stefan Monnier * keyboard.c (safe_run_hook_funcall): New function. @@ -43,7 +59,7 @@ * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar. -2011-03-27 Anders Lindgren +2011-03-27 Anders Lindgren * nsterm.m (ns_menu_bar_is_hidden): New variable. (ns_constrain_all_frames, ns_menu_bar_should_be_hidden) diff --git a/src/character.c b/src/character.c index fdaf22f04f8..41c692e7483 100644 --- a/src/character.c +++ b/src/character.c @@ -232,13 +232,10 @@ translate_char (Lisp_Object table, int c) } /* Convert ASCII or 8-bit character C to unibyte. If C is none of - them, return (C & 0xFF). - - The argument REV_TBL is now ignored. It will be removed in the - future. */ + them, return (C & 0xFF). */ int -multibyte_char_to_unibyte (int c, Lisp_Object rev_tbl) +multibyte_char_to_unibyte (int c) { if (c < 0x80) return c; diff --git a/src/character.h b/src/character.h index 91020cadedc..7a75ac186fa 100644 --- a/src/character.h +++ b/src/character.h @@ -69,7 +69,7 @@ along with GNU Emacs. If not, see . */ #define CHAR_TO_BYTE8(c) \ (CHAR_BYTE8_P (c) \ ? (c) - 0x3FFF00 \ - : multibyte_char_to_unibyte (c, Qnil)) + : multibyte_char_to_unibyte (c)) /* Return the raw 8-bit byte for character C, or -1 if C doesn't correspond to a byte. */ diff --git a/src/cmds.c b/src/cmds.c index ebbb223c2db..1cf7ff24fec 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -352,7 +352,7 @@ internal_self_insert (int c, EMACS_INT n) { str[0] = (SINGLE_BYTE_CHAR_P (c) ? c - : multibyte_char_to_unibyte (c, Qnil)); + : multibyte_char_to_unibyte (c)); len = 1; } if (!NILP (overwrite) diff --git a/src/coding.c b/src/coding.c index 0596d16bf46..fd812148a26 100644 --- a/src/coding.c +++ b/src/coding.c @@ -853,8 +853,7 @@ static unsigned char *alloc_destination (struct coding_system *, EMACS_INT, unsigned char *); static void setup_iso_safe_charsets (Lisp_Object); static unsigned char *encode_designation_at_bol (struct coding_system *, - int *, int *, - unsigned char *); + int *, unsigned char *); static int detect_eol (const unsigned char *, EMACS_INT, enum coding_category); static Lisp_Object adjust_coding_eol_type (struct coding_system *, int); @@ -4299,7 +4298,7 @@ encode_invocation_designation (struct charset *charset, static unsigned char * encode_designation_at_bol (struct coding_system *coding, int *charbuf, - int *charbuf_end, unsigned char *dst) + unsigned char *dst) { struct charset *charset; /* Table of charsets to be designated to each graphic register. */ @@ -4390,7 +4389,7 @@ encode_coding_iso_2022 (struct coding_system *coding) unsigned char *dst_prev = dst; /* We have to produce designation sequences if any now. */ - dst = encode_designation_at_bol (coding, charbuf, charbuf_end, dst); + dst = encode_designation_at_bol (coding, charbuf, dst); bol_designation = 0; /* We are sure that designation sequences are all ASCII bytes. */ produced_chars += dst - dst_prev; diff --git a/src/editfns.c b/src/editfns.c index 009e1d34bde..b04414e1ae6 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2226,7 +2226,7 @@ general_insert_function (void (*insert_func) { str[0] = (ASCII_CHAR_P (XINT (val)) ? XINT (val) - : multibyte_char_to_unibyte (XINT (val), Qnil)); + : multibyte_char_to_unibyte (XINT (val))); len = 1; } (*insert_func) ((char *) str, len); diff --git a/src/keymap.c b/src/keymap.c index 440df06ba4e..10000b935aa 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -2387,7 +2387,7 @@ push_key_description (register unsigned int c, register char *p, int force_multi /* Now we are sure that C is a valid character code. */ if (NILP (BVAR (current_buffer, enable_multibyte_characters)) && ! force_multibyte) - *p++ = multibyte_char_to_unibyte (c, Qnil); + *p++ = multibyte_char_to_unibyte (c); else p += CHAR_STRING (c, (unsigned char *) p); } diff --git a/src/lisp.h b/src/lisp.h index 1e255df1ecc..a3c4d48b49c 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2403,7 +2403,7 @@ EXFUN (Fchar_width, 1); EXFUN (Fstring, MANY); extern EMACS_INT chars_in_text (const unsigned char *, EMACS_INT); extern EMACS_INT multibyte_chars_in_text (const unsigned char *, EMACS_INT); -extern int multibyte_char_to_unibyte (int, Lisp_Object); +extern int multibyte_char_to_unibyte (int); extern int multibyte_char_to_unibyte_safe (int); extern void init_character_once (void); extern void syms_of_character (void); diff --git a/src/search.c b/src/search.c index 59a530eff61..682fa185bbb 100644 --- a/src/search.c +++ b/src/search.c @@ -2634,11 +2634,8 @@ since only regular expressions have distinguished subexpressions. */) EMACS_INT substed_alloc_size, substed_len; int buf_multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); int str_multibyte = STRING_MULTIBYTE (newtext); - Lisp_Object rev_tbl; int really_changed = 0; - rev_tbl = Qnil; - substed_alloc_size = length * 2 + 100; substed = (unsigned char *) xmalloc (substed_alloc_size + 1); substed_len = 0; @@ -2658,7 +2655,7 @@ since only regular expressions have distinguished subexpressions. */) { FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, newtext, pos, pos_byte); if (!buf_multibyte) - c = multibyte_char_to_unibyte (c, rev_tbl); + c = multibyte_char_to_unibyte (c); } else { @@ -2681,7 +2678,7 @@ since only regular expressions have distinguished subexpressions. */) FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, newtext, pos, pos_byte); if (!buf_multibyte && !ASCII_CHAR_P (c)) - c = multibyte_char_to_unibyte (c, rev_tbl); + c = multibyte_char_to_unibyte (c); } else { diff --git a/src/xdisp.c b/src/xdisp.c index 148c7bc5ec6..308588101e2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7962,7 +7962,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) c = string_char_and_length (msg + i, &char_bytes); work[0] = (ASCII_CHAR_P (c) ? c - : multibyte_char_to_unibyte (c, Qnil)); + : multibyte_char_to_unibyte (c)); insert_1_both (work, 1, 1, 1, 0, 0); } } @@ -9223,7 +9223,7 @@ set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multiby c = string_char_and_length (msg + i, &n); work[0] = (ASCII_CHAR_P (c) ? c - : multibyte_char_to_unibyte (c, Qnil)); + : multibyte_char_to_unibyte (c)); insert_1_both (work, 1, 1, 1, 0, 0); } } From ac45a3386eab2644a1c21d8816e247d596e29a5e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 28 Mar 2011 20:33:22 -0700 Subject: [PATCH 149/166] * INSTALL.BZR: Tiny re-wording. --- INSTALL.BZR | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.BZR b/INSTALL.BZR index abb98fd796b..93229ec7a79 100644 --- a/INSTALL.BZR +++ b/INSTALL.BZR @@ -17,7 +17,7 @@ The `autogen.sh' script can help you figure out if you have the necessary tools. The first time you build, there are a couple of extra steps. -First, generate the `configure' script: +First, generate the `configure' script and some related files: $ ./autogen.sh From 8c422c30830f085a5f721b2be6c874adb05ccea8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 28 Mar 2011 23:54:38 -0700 Subject: [PATCH 150/166] * etags.c (just_read_file): Remove dummy variable and simplify. --- lib-src/ChangeLog | 4 ++++ lib-src/etags.c | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index f594efa588c..1c0c506f0e0 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-29 Paul Eggert + + * etags.c (just_read_file): Remove dummy variable and simplify. + 2011-03-27 Glenn Morris * emacsclient.c: Replace SIGTYPE with void. diff --git a/lib-src/etags.c b/lib-src/etags.c index 6cb321fe75e..a2cdf26abc7 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -3978,10 +3978,8 @@ Yacc_entries (FILE *inf) static void just_read_file (FILE *inf) { - register char *dummy; - - LOOP_ON_INPUT_LINES (inf, lb, dummy) - continue; + while (!feof (inf)) + readline (&lb, inf); } From 0bc329278f23e457aac9a6b078f5cdbd80aa28d9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 28 Mar 2011 23:57:40 -0700 Subject: [PATCH 151/166] * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]: Omit unused local var. --- src/ChangeLog | 5 +++++ src/dispnew.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index eb1555db6fb..79b86d561af 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-29 Paul Eggert + + * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]: + Omit unused local var. + 2011-03-27 Paul Eggert * keyboard.c (parse_modifiers_uncached, parse_modifiers): diff --git a/src/dispnew.c b/src/dispnew.c index a15b5f45e60..3a78845fa56 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -3590,7 +3590,10 @@ update_window (struct window *w, int force_p) struct glyph_row *row, *end; struct glyph_row *mode_line_row; struct glyph_row *header_line_row; - int yb, changed_p = 0, mouse_face_overwritten_p = 0, n_updated; + int yb, changed_p = 0, mouse_face_overwritten_p = 0; +#if ! PERIODIC_PREEMPTION_CHECKING + int n_updated = 0; +#endif rif->update_window_begin_hook (w); yb = window_text_bottom_y (w); @@ -3643,7 +3646,7 @@ update_window (struct window *w, int force_p) } /* Update the rest of the lines. */ - for (n_updated = 0; row < end && (force_p || !input_pending); ++row) + for (; row < end && (force_p || !input_pending); ++row) if (row->enabled_p) { int vpos = MATRIX_ROW_VPOS (row, desired_matrix); From b01a1c29127705cf435f02d50b48d6f85f5b2716 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 28 Mar 2011 23:58:36 -0700 Subject: [PATCH 152/166] * menu.c (digest_single_submenu): Omit unused local var. --- src/ChangeLog | 1 + src/menu.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 79b86d561af..1f636e0dde6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,6 @@ 2011-03-29 Paul Eggert + * menu.c (digest_single_submenu): Omit unused local var. * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]: Omit unused local var. diff --git a/src/menu.c b/src/menu.c index 851f1ac804b..a9098deed7e 100644 --- a/src/menu.c +++ b/src/menu.c @@ -662,13 +662,12 @@ digest_single_submenu (int start, int end, int top_level_items) else if (EQ (XVECTOR (menu_items)->contents[i], Qt)) { /* Create a new pane. */ - Lisp_Object pane_name, prefix; + Lisp_Object pane_name; const char *pane_string; panes_seen++; pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; - prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; #ifdef HAVE_NTGUI if (STRINGP (pane_name)) From c499e55717190f3fcf46fd04cfead5bf31962ab2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 28 Mar 2011 23:59:27 -0700 Subject: [PATCH 153/166] * window.c (shrink_windows): Omit unused local var. --- src/ChangeLog | 1 + src/window.c | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1f636e0dde6..938619aa08f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,6 @@ 2011-03-29 Paul Eggert + * window.c (shrink_windows): Omit unused local var. * menu.c (digest_single_submenu): Omit unused local var. * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]: Omit unused local var. diff --git a/src/window.c b/src/window.c index 9ab9fab2c13..b7747b5ad79 100644 --- a/src/window.c +++ b/src/window.c @@ -2978,14 +2978,10 @@ shrink_windows (int total, int size, int nchildren, int shrinkable, while (total_shrink > total_removed) { int nonzero_sizes = 0; - int nonzero_idx = -1; for (i = 0; i < nchildren; ++i) if (new_sizes[i] > 0) - { - ++nonzero_sizes; - nonzero_idx = i; - } + ++nonzero_sizes; for (i = 0; i < nchildren; ++i) if (new_sizes[i] > min_sizes[i]) From 792c7b2ba5319f436b459ff2c0d21e20207db550 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 29 Mar 2011 00:01:11 -0700 Subject: [PATCH 154/166] * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs): (note_mode_line_or_margin_highlight, note_mouse_highlight): Omit unused local vars. --- src/ChangeLog | 3 +++ src/xdisp.c | 18 +++++------------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 938619aa08f..6ba04202854 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-29 Paul Eggert + * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs): + (note_mode_line_or_margin_highlight, note_mouse_highlight): + Omit unused local vars. * window.c (shrink_windows): Omit unused local var. * menu.c (digest_single_submenu): Omit unused local var. * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]: diff --git a/src/xdisp.c b/src/xdisp.c index 140c2155d15..f286000c966 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -14643,8 +14643,6 @@ try_window_reusing_current_matrix (struct window *w) if (CHARPOS (new_start) <= CHARPOS (start)) { - int first_row_y; - /* Don't use this method if the display starts with an ellipsis displayed for invisible text. It's not easy to handle that case below, and it's certainly not worth the effort since this is @@ -14659,7 +14657,6 @@ try_window_reusing_current_matrix (struct window *w) text. Note that it.vpos == 0 if or if not there is a header-line; it's not the same as the MATRIX_ROW_VPOS! */ start_display (&it, w, new_start); - first_row_y = it.current_y; w->cursor.vpos = -1; last_text_row = last_reused_text_row = NULL; @@ -22757,7 +22754,6 @@ x_produce_glyphs (struct it *it) int ch = COMPOSITION_GLYPH (cmp, i); int face_id; struct face *this_face; - int this_boff; if (ch == '\t') ch = ' '; @@ -22769,9 +22765,6 @@ x_produce_glyphs (struct it *it) pcm = NULL; else { - this_boff = font->baseline_offset; - if (font->vertical_centering) - this_boff = VCENTER_BASELINE_OFFSET (font, it->f) - boff; get_char_face_and_encoding (it->f, ch, face_id, &char2b, it->multibyte_p, 0); pcm = get_per_char_metric (it->f, font, &char2b); @@ -24974,10 +24967,9 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, CONSP (hotspot)) && (hotspot = XCDR (hotspot), CONSP (hotspot))) { - Lisp_Object area_id, plist; + Lisp_Object plist; - area_id = XCAR (hotspot); - /* Could check AREA_ID to see if we enter/leave this hot-spot. + /* Could check XCAR (hotspot) to see if we enter/leave this hot-spot. If so, we could look for mouse-enter, mouse-leave properties in PLIST (and do something...). */ hotspot = XCDR (hotspot); @@ -25312,10 +25304,10 @@ note_mouse_highlight (struct frame *f, int x, int y) CONSP (hotspot)) && (hotspot = XCDR (hotspot), CONSP (hotspot))) { - Lisp_Object area_id, plist; + Lisp_Object plist; - area_id = XCAR (hotspot); - /* Could check AREA_ID to see if we enter/leave this hot-spot. + /* Could check XCAR (hotspot) to see if we enter/leave + this hot-spot. If so, we could look for mouse-enter, mouse-leave properties in PLIST (and do something...). */ hotspot = XCDR (hotspot); From ea62283460e5aae0f3e5dc68f38d035d5f17f540 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 29 Mar 2011 16:25:31 +0800 Subject: [PATCH 155/166] Add to minibuffer-history if HISOTRY is nil in ido.el It is broken by the change on 2011-03-21. --- lisp/ChangeLog | 5 +++++ lisp/ido.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9eeac0d2155..57916aa2f0a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-29 Leo Liu + + * ido.el (ido-read-internal): Use the default history var + minibuffer-history if no HISTORY is specified. + 2011-03-28 Leo Liu * abbrev.el (abbrev-table-empty-p): New function. diff --git a/lisp/ido.el b/lisp/ido.el index 177f9338870..0ce83d9b88c 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -2151,7 +2151,7 @@ If INITIAL is non-nil, it specifies the initial input string." (t (setq done t)))))) - (and history (add-to-history history ido-selected)) + (add-to-history (or history 'minibuffer-history) ido-selected) ido-selected)) (defun ido-edit-input () From b62f8267c3356c0f8d5357d148726a82bf37b371 Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Tue, 29 Mar 2011 13:23:38 +0000 Subject: [PATCH 156/166] Merge changes made in Gnus trunk. mm-view.el (mm-display-inline-fontify): Use `set-normal-mode' with local variables disabled rather than `normal-mode'. imap.el (imap-shell-open, imap-process-connection-type): Use imap-process-connection-type for 'shell' streams as well as Kerberos, SSL, other subprocesses. --- lisp/ChangeLog | 6 ++++++ lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/mm-view.el | 3 ++- lisp/net/imap.el | 3 ++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 57916aa2f0a..dbd335b73dd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,12 @@ * ido.el (ido-read-internal): Use the default history var minibuffer-history if no HISTORY is specified. +2011-03-28 Brian T. Sniffen (tiny change) + + * net/imap.el (imap-shell-open, imap-process-connection-type): Use + imap-process-connection-type for 'shell' streams as well as + Kerberos, SSL, other subprocesses. + 2011-03-28 Leo Liu * abbrev.el (abbrev-table-empty-p): New function. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index f257ff51f3d..a6faaf036a5 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-03-29 Julien Danjou + + * mm-view.el (mm-display-inline-fontify): Use `set-normal-mode' with + local variables disabled rather than `normal-mode'. + 2011-03-26 Chong Yidong * proto-stream.el: Changes preparatory to merging open-protocol-stream diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 39d49af0600..abd78b8de02 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -603,9 +603,10 @@ If MODE is not set, try to find mode automatically." ;; I find font-lock a bit too verbose. (font-lock-verbose nil)) (setq buffer-file-name (mm-handle-filename handle)) + (set (make-local-variable 'enable-local-variables) nil) (if mode (funcall mode) - (normal-mode)) + (set-auto-mode)) ;; The mode function might have already turned on font-lock. (unless (symbol-value 'font-lock-mode) (font-lock-fontify-buffer))) diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 6d80b97fd23..f4af03f100f 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -211,7 +211,7 @@ until a successful connection is made." :type '(repeat string)) (defcustom imap-process-connection-type nil - "*Value for `process-connection-type' to use for Kerberos4, GSSAPI and SSL. + "*Value for `process-connection-type' to use for Kerberos4, GSSAPI, shell, and SSL. The `process-connection-type' variable controls the type of device used to communicate with subprocesses. Values are nil to use a pipe, or t or `pty' to use a pty. The value has no effect if the @@ -770,6 +770,7 @@ sure of changing the value of `foo'." (let* ((port (or port imap-default-port)) (coding-system-for-read imap-coding-system-for-read) (coding-system-for-write imap-coding-system-for-write) + (process-connection-type imap-process-connection-type) (process (start-process name buffer shell-file-name shell-command-switch (format-spec From 94eab1c84d9862cb56db2f610362e33107d75774 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 29 Mar 2011 16:00:16 +0200 Subject: [PATCH 157/166] src/scroll.c, src/w32.c: Trivial whitespace changes. --- src/scroll.c | 11 ++++-- src/w32.c | 101 ++++++++++++++++++++++++++------------------------- 2 files changed, 59 insertions(+), 53 deletions(-) diff --git a/src/scroll.c b/src/scroll.c index f013ebbee0e..fcec596daa3 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -239,7 +239,9 @@ calculate_scrolling (FRAME_PTR frame, of lines. */ static void -do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct matrix_elt *matrix, int window_size, int unchanged_at_top) +do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, + struct matrix_elt *matrix, int window_size, + int unchanged_at_top) { struct matrix_elt *p; int i, j, k; @@ -831,7 +833,9 @@ scrolling_1 (FRAME_PTR frame, int window_size, int unchanged_at_top, such a line will have little weight. */ int -scrolling_max_lines_saved (int start, int end, int *oldhash, int *newhash, int *cost) +scrolling_max_lines_saved (int start, int end, + int *oldhash, int *newhash, + int *cost) { struct { int hash; int count; } lines[01000]; register int i, h; @@ -920,7 +924,8 @@ scroll_cost (FRAME_PTR frame, int from, int to, int amount) overhead and multiply factor values */ static void -line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, register int *ov, register int *mf) +line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, + register int *ov, register int *mf) { register EMACS_INT i; register EMACS_INT frame_lines = FRAME_LINES (frame); diff --git a/src/w32.c b/src/w32.c index 495f878d3a8..da403671115 100644 --- a/src/w32.c +++ b/src/w32.c @@ -1505,6 +1505,7 @@ w32_get_resource (char *key, LPDWORD lpdwtype) } char *get_emacs_configuration (void); + void init_environment (char ** argv) { @@ -1591,25 +1592,25 @@ init_environment (char ** argv) If not, then we can try to default to the appdata directory under the user's profile, which is more likely to be writable. */ if (stat ("C:/.emacs", &ignored) < 0) - { - HRESULT profile_result; - /* Dynamically load ShGetFolderPath, as it won't exist on versions - of Windows 95 and NT4 that have not been updated to include - MSIE 5. */ - ShGetFolderPath_fn get_folder_path; - get_folder_path = (ShGetFolderPath_fn) - GetProcAddress (GetModuleHandle ("shell32.dll"), "SHGetFolderPathA"); + { + HRESULT profile_result; + /* Dynamically load ShGetFolderPath, as it won't exist on versions + of Windows 95 and NT4 that have not been updated to include + MSIE 5. */ + ShGetFolderPath_fn get_folder_path; + get_folder_path = (ShGetFolderPath_fn) + GetProcAddress (GetModuleHandle ("shell32.dll"), "SHGetFolderPathA"); - if (get_folder_path != NULL) - { - profile_result = get_folder_path (NULL, CSIDL_APPDATA, NULL, - 0, default_home); + if (get_folder_path != NULL) + { + profile_result = get_folder_path (NULL, CSIDL_APPDATA, NULL, + 0, default_home); - /* If we can't get the appdata dir, revert to old behavior. */ - if (profile_result == S_OK) - env_vars[0].def_value = default_home; - } - } + /* If we can't get the appdata dir, revert to old behavior. */ + if (profile_result == S_OK) + env_vars[0].def_value = default_home; + } + } /* Get default locale info and use it for LANG. */ if (GetLocaleInfo (LOCALE_USER_DEFAULT, @@ -2082,42 +2083,42 @@ GetCachedVolumeInformation (char * root_dir) info = lookup_volume_info (root_dir); if (info == NULL || ! VOLINFO_STILL_VALID (root_dir, info)) - { - char name[ 256 ]; - DWORD serialnum; - DWORD maxcomp; - DWORD flags; - char type[ 256 ]; + { + char name[ 256 ]; + DWORD serialnum; + DWORD maxcomp; + DWORD flags; + char type[ 256 ]; - /* Info is not cached, or is stale. */ - if (!GetVolumeInformation (root_dir, - name, sizeof (name), - &serialnum, - &maxcomp, - &flags, - type, sizeof (type))) - return NULL; + /* Info is not cached, or is stale. */ + if (!GetVolumeInformation (root_dir, + name, sizeof (name), + &serialnum, + &maxcomp, + &flags, + type, sizeof (type))) + return NULL; - /* Cache the volume information for future use, overwriting existing - entry if present. */ - if (info == NULL) - { - info = (volume_info_data *) xmalloc (sizeof (volume_info_data)); - add_volume_info (root_dir, info); - } - else - { - xfree (info->name); - xfree (info->type); - } + /* Cache the volume information for future use, overwriting existing + entry if present. */ + if (info == NULL) + { + info = (volume_info_data *) xmalloc (sizeof (volume_info_data)); + add_volume_info (root_dir, info); + } + else + { + xfree (info->name); + xfree (info->type); + } - info->name = xstrdup (name); - info->serialnum = serialnum; - info->maxcomp = maxcomp; - info->flags = flags; - info->type = xstrdup (type); - info->timestamp = GetTickCount (); - } + info->name = xstrdup (name); + info->serialnum = serialnum; + info->maxcomp = maxcomp; + info->flags = flags; + info->type = xstrdup (type); + info->timestamp = GetTickCount (); + } return info; } From d806ab682a8e914345db3f2eede292f85745c98c Mon Sep 17 00:00:00 2001 From: Ken Manheimer Date: Tue, 29 Mar 2011 14:26:01 -0400 Subject: [PATCH 158/166] * allout.el (allout-hide-by-annotation, allout-flag-region): Reduce possibility of overlay leakage by making them volatile. * allout-widgets.el (allout-widgets-tally): Define as nil so the hash is not shared between buffers. Mode initialization is responsible for giving it a useful starting value. (allout-item-span): Reduce possibility of overlay leakage by making them volatile. (allout-widgets-count-buttons-in-region): Add diagnostic function for tracking down overlay leaks. --- lisp/ChangeLog | 13 +++++++++++++ lisp/allout-widgets.el | 16 +++++++++++++++- lisp/allout.el | 5 +++-- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dbd335b73dd..8e6e78c705e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2011-03-29 Ken Manheimer + + * allout.el (allout-hide-by-annotation, allout-flag-region): + Reduce possibility of overlay leakage by making them volatile. + + * allout-widgets.el (allout-widgets-tally): Define as nil so the + hash is not shared between buffers. Mode initialization is + responsible for giving it a useful starting value. + (allout-item-span): Reduce possibility of overlay leakage by + making them volatile. + (allout-widgets-count-buttons-in-region): Add diagnostic function + for tracking down button overlay leaks. + 2011-03-29 Leo Liu * ido.el (ido-read-internal): Use the default history var diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 47f181ab76b..ae4265bda1f 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -238,7 +238,7 @@ buffer, and tracking increases as new widgets are added and decreases as obsolete widgets are garbage collected." :type 'boolean :group 'allout-widgets-developer) -(defvar allout-widgets-tally (make-hash-table :test 'eq :weakness 'key) +(defvar allout-widgets-tally nil "Hash-table of existing allout widgets, for debugging. Table is maintained iff `allout-widgets-maintain-tally' is non-nil. @@ -2100,6 +2100,7 @@ previously established or is not moved." (cond ((not overlay) (when start (setq overlay (make-overlay start end nil t nil)) (overlay-put overlay 'button item-widget) + (overlay-put overlay 'evaporate t) (widget-put item-widget :span-overlay overlay) t)) ;; report: @@ -2343,6 +2344,19 @@ The elements of LIST are not copied, just the list structure itself." (while (consp list) (push (pop list) res)) (prog1 (nreverse res) (setcdr res list))) (car list))) +;;;_ . allout-widgets-count-buttons-in-region (start end) +(defun allout-widgets-count-buttons-in-region (start end) + "Debugging/diagnostic tool - count overlays with 'button' property in region." + (interactive "r") + (setq start (or start (point-min)) + end (or end (point-max))) + (if (> start end) (let ((interim start)) (setq start end end interim))) + (let ((button-overlays (delq nil + (mapcar (function (lambda (o) + (if (overlay-get o 'button) + o))) + (overlays-in start end))))) + (length button-overlays))) ;;;_ : Run unit tests: (defun allout-widgets-run-unit-tests () diff --git a/lisp/allout.el b/lisp/allout.el index 3fb8ed7ccd5..736ec42718b 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -4489,8 +4489,9 @@ Topic exposure is marked with text-properties, to be used by ;; advance to just after end of this annotation: (setq next (allout-next-single-char-property-change (point) 'allout-was-hidden nil end)) - (overlay-put (make-overlay prev next nil 'front-advance) - 'category 'allout-exposure-category) + (let ((o (make-overlay prev next nil 'front-advance))) + (overlay-put o 'category 'allout-exposure-category) + (overlay-put o 'evaporate t)) (allout-deannotate-hidden prev next) (setq prev next) (if next (goto-char next))))) From f838ed7b0ac1f7715f49b1e5d7de9b75b4159b64 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 29 Mar 2011 17:17:26 -0700 Subject: [PATCH 159/166] * editfns.c (Fmessage_box): Remove unused local var. --- src/ChangeLog | 4 ++++ src/editfns.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4e84f9510dd..2f88aa5ad07 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-30 Paul Eggert + + * editfns.c (Fmessage_box): Remove unused local var. + 2011-03-29 Paul Eggert * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs): diff --git a/src/editfns.c b/src/editfns.c index 58f634fa479..d0f1df694d5 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3444,12 +3444,12 @@ usage: (message-box FORMAT-STRING &rest ARGS) */) if (FRAME_WINDOW_P (XFRAME (selected_frame)) || FRAME_MSDOS_P (XFRAME (selected_frame))) { - Lisp_Object pane, menu, obj; + Lisp_Object pane, menu; struct gcpro gcpro1; pane = Fcons (Fcons (build_string ("OK"), Qt), Qnil); GCPRO1 (pane); menu = Fcons (val, pane); - obj = Fx_popup_dialog (Qt, menu, Qt); + Fx_popup_dialog (Qt, menu, Qt); UNGCPRO; return val; } From de6dbc14a72347f3f2a3b4f0bf3c39d6f69a425e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 29 Mar 2011 17:19:27 -0700 Subject: [PATCH 160/166] * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]: Remove unused local var. --- src/ChangeLog | 3 +++ src/unexelf.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 2f88aa5ad07..c44444a9244 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-30 Paul Eggert + * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]: + Remove unused local var. + * editfns.c (Fmessage_box): Remove unused local var. 2011-03-29 Paul Eggert diff --git a/src/unexelf.c b/src/unexelf.c index b58c78501b8..8b45894f853 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -651,7 +651,9 @@ unexec (const char *new_name, const char *old_name) int n, nn; int old_bss_index, old_sbss_index, old_plt_index; int old_data_index, new_data2_index; +#if defined _SYSTYPE_SYSV || defined __sgi int old_mdebug_index; +#endif struct stat stat_buf; int old_file_size; @@ -695,8 +697,10 @@ unexec (const char *new_name, const char *old_name) /* Find the mdebug section, if any. */ +#if defined _SYSTYPE_SYSV || defined __sgi old_mdebug_index = find_section (".mdebug", old_section_names, old_name, old_file_h, old_section_h, 1); +#endif /* Find the old .bss section. Figure out parameters of the new data2 and bss sections. */ From eb7ffc147d1b6910e73b5323ecfa4cc45f7464a4 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Wed, 30 Mar 2011 09:06:00 +0800 Subject: [PATCH 161/166] Improve key bindings in edit-abbrevs-mode C-x C-s and C-x C-w in edit-abbrevs-mode now do something similar to their corresponding global bindings. --- lisp/ChangeLog | 7 +++++++ lisp/abbrev.el | 29 +++++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8e6e78c705e..7ce8b62b333 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-03-30 Leo Liu + + * abbrev.el (abbrev-edit-save-to-file, abbrev-edit-save-buffer): + New commands. + (edit-abbrevs-map): Bind them here. + (write-abbrev-file): New optinal arg VERBOSE. (Bug#5937) + 2011-03-29 Ken Manheimer * allout.el (allout-hide-by-annotation, allout-flag-region): diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 504d9fcbbce..ddf37aff58f 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -65,7 +65,8 @@ abbreviation causes it to expand and be replaced by its expansion." (defvar edit-abbrevs-map (let ((map (make-sparse-keymap))) - (define-key map "\C-x\C-s" 'edit-abbrevs-redefine) + (define-key map "\C-x\C-s" 'abbrev-edit-save-buffer) + (define-key map "\C-x\C-w" 'abbrev-edit-save-to-file) (define-key map "\C-c\C-c" 'edit-abbrevs-redefine) map) "Keymap used in `edit-abbrevs'.") @@ -216,13 +217,15 @@ Does not display any message." ;(interactive "fRead abbrev file: ") (read-abbrev-file file t)) -(defun write-abbrev-file (&optional file) +(defun write-abbrev-file (&optional file verbose) "Write all user-level abbrev definitions to a file of Lisp code. This does not include system abbrevs; it includes only the abbrev tables listed in listed in `abbrev-table-name-list'. The file written can be loaded in another session to define the same abbrevs. The argument FILE is the file name to write. If omitted or nil, the file -specified in `abbrev-file-name' is used." +specified in `abbrev-file-name' is used. +If VERBOSE is non-nil, display a message indicating where abbrevs +have been saved." (interactive (list (read-file-name "Write abbrev file: " @@ -252,7 +255,25 @@ specified in `abbrev-file-name' is used." 'emacs-mule))) (goto-char (point-min)) (insert (format ";;-*-coding: %s;-*-\n" coding-system-for-write)) - (write-region nil nil file nil 0)))) + (write-region nil nil file nil (and (not verbose) 0))))) + +(defun abbrev-edit-save-to-file (file) + "Save all user-level abbrev definitions in current buffer to FILE." + (interactive + (list (read-file-name "Save abbrevs to file: " + (file-name-directory + (expand-file-name abbrev-file-name)) + abbrev-file-name))) + (edit-abbrevs-redefine) + (write-abbrev-file file t)) + +(defun abbrev-edit-save-buffer () + "Save all user-level abbrev definitions in current buffer. +The saved abbrevs are written to the file specified by +`abbrev-file-name'." + (interactive) + (abbrev-edit-save-to-file abbrev-file-name)) + (defun add-mode-abbrev (arg) "Define mode-specific abbrev for last word(s) before point. From e742e11707450212291d8e1c1bc13fbe51de1cb2 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 29 Mar 2011 22:21:28 -0400 Subject: [PATCH 162/166] Change default type of open-protocol-stream. * nnimap.el (nnimap-stream, nnimap-open-connection-1): Accept `network' value. * nntp.el (nntp-open-connection-function): Document the fact that some values are not functions but are instead handled specially. Recognize nntp-open-plain-stream value. (nntp-open-connection): Recognize that value. * proto-stream.el (open-protocol-stream): Bring back `network' type. Make this the default type. (proto-stream-open-plain): Rename from proto-stream-open-default. (open-protocol-stream, proto-stream-open-starttls) (proto-stream-open-tls, proto-stream-open-shell): Replace `default' with `plain'. --- lisp/gnus/ChangeLog | 17 ++++++++ lisp/gnus/nnimap.el | 14 +++--- lisp/gnus/nntp.el | 46 ++++++++++---------- lisp/gnus/proto-stream.el | 90 +++++++++++++++++++-------------------- 4 files changed, 92 insertions(+), 75 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a6faaf036a5..f6b7db61d96 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,20 @@ +2011-03-30 Chong Yidong + + * proto-stream.el (open-protocol-stream): Bring back `network' type. + Make this the default type. + (proto-stream-open-plain): Rename from proto-stream-open-default. + (open-protocol-stream, proto-stream-open-starttls) + (proto-stream-open-tls, proto-stream-open-shell): Replace `default' + with `plain'. + + * nnimap.el (nnimap-stream, nnimap-open-connection-1): Accept `network' + value. + + * nntp.el (nntp-open-connection-function): Document the fact that some + values are not functions but are instead handled specially. Recognize + nntp-open-plain-stream value. + (nntp-open-connection): Recognize that value. + 2011-03-29 Julien Danjou * mm-view.el (mm-display-inline-fontify): Use `set-normal-mode' with diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 15d7f463d41..ccb082d6c71 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -61,10 +61,12 @@ If nnimap-stream is `ssl', this will default to `imaps'. If not, it will default to `imap'.") (defvoo nnimap-stream 'undecided - "How nnimap will talk to the IMAP server. -Values are `ssl', `default', `try-starttls', `starttls' or -`shell'. The default is to try `ssl' first, and then -`try-starttls'.") + "How nnimap talks to the IMAP server. +The value should be either `undecided', `ssl' or `tls', +`network', `starttls', `plain', or `shell'. + +If the value is `undecided', nnimap tries `ssl' first, then falls +back on `network'.") (defvoo nnimap-shell-program (if (boundp 'imap-shell-program) (if (listp imap-shell-program) @@ -319,7 +321,7 @@ textual parts.") (setq nnimap-stream 'ssl)) (let ((stream (if (eq nnimap-stream 'undecided) - (loop for type in '(ssl try-starttls) + (loop for type in '(ssl network) for stream = (let ((nnimap-stream type)) (nnimap-open-connection-1 buffer)) while (eq stream 'no-connect) @@ -339,7 +341,7 @@ textual parts.") (port nil) (ports (cond - ((memq nnimap-stream '(try-starttls default starttls)) + ((memq nnimap-stream '(network plain starttls)) (nnheader-message 7 "Opening connection to %s..." nnimap-address) '("imap" "143")) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 9065027d34f..fa765e17463 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -76,27 +76,27 @@ to innd, you could say something like: You probably don't want to do that, though.") (defvoo nntp-open-connection-function 'nntp-open-network-stream - "*Function used for connecting to a remote system. -It will be called with the buffer to output in as argument. + "Method for connecting to a remote system. +It should be a function, which is called with the output buffer +as its single argument, or one of the following special values: -Currently, five such functions are provided (please refer to their -respective doc string for more information), three of them establishing -direct connections to the nntp server, and two of them using an indirect -host. +- `nntp-open-network-stream' specifies a network connection, + upgrading to a TLS connection via STARTTLS if possible. +- `nntp-open-plain-stream' specifies an unencrypted network + connection (no STARTTLS upgrade is attempted). +- `nntp-open-ssl-stream' or `nntp-open-tls-stream' specify a TLS + network connection. -Direct connections: -- `nntp-open-network-stream' (the default), -- `network-only' (the same as the above, but don't do automatic - STARTTLS upgrades). -- `nntp-open-ssl-stream', -- `nntp-open-tls-stream', -- `nntp-open-netcat-stream'. -- `nntp-open-telnet-stream'. - -Indirect connections: -- `nntp-open-via-rlogin-and-netcat', -- `nntp-open-via-rlogin-and-telnet', -- `nntp-open-via-telnet-and-telnet'.") +Apart from the above special values, valid functions are as +follows; please refer to their respective doc string for more +information. +For direct connections: +- `nntp-open-netcat-stream' +- `nntp-open-telnet-stream' +For indirect connections: +- `nntp-open-via-rlogin-and-netcat' +- `nntp-open-via-rlogin-and-telnet' +- `nntp-open-via-telnet-and-telnet'") (defvoo nntp-never-echoes-commands nil "*Non-nil means the nntp server never echoes commands. @@ -1339,15 +1339,15 @@ password contained in '~/.nntp-authinfo'." (condition-case err (let ((coding-system-for-read nntp-coding-system-for-read) (coding-system-for-write nntp-coding-system-for-write) - (map '((nntp-open-network-stream try-starttls) - (network-only default) + (map '((nntp-open-network-stream network) + (network-only plain) ; compat + (nntp-open-plain-stream plain) (nntp-open-ssl-stream tls) (nntp-open-tls-stream tls)))) (if (assoc nntp-open-connection-function map) (open-protocol-stream "nntpd" pbuffer nntp-address nntp-port-number - :type (or (cadr (assoc nntp-open-connection-function map)) - 'try-starttls) + :type (cadr (assoc nntp-open-connection-function map)) :end-of-command "^\\([2345]\\|[.]\\).*\n" :capability-command "CAPABILITIES\r\n" :success "^3" diff --git a/lisp/gnus/proto-stream.el b/lisp/gnus/proto-stream.el index 5e92cb40264..45cc974e7a9 100644 --- a/lisp/gnus/proto-stream.el +++ b/lisp/gnus/proto-stream.el @@ -37,7 +37,7 @@ ;; (open-protocol-stream ;; "*nnimap*" buffer address port -;; :type 'try-starttls +;; :type 'network ;; :capability-command "1 CAPABILITY\r\n" ;; :success " OK " ;; :starttls-function @@ -65,17 +65,20 @@ the same meanings as in `open-network-stream'. The remaining PARAMETERS should be a sequence of keywords and values: :type specifies the connection type, one of the following: - `default' -- An ordinary network connection. - `try-starttls' - -- Begin an ordinary network connection, and try - upgrading it to an encrypted connection via - STARTTLS if both HOST and Emacs support TLS. If - that fails, keep the unencrypted connection. - `starttls' -- Begin an ordinary connection, and try upgrading - it via STARTTLS. If that fails for any reason, - drop the connection; in this case, the returned - process object is a killed process. - `tls' or `ssl' -- A TLS connection. + nil or `network' + -- Begin with an ordinary network connection, and if + the parameters :success and :capability-command + are also supplied, try to upgrade to an encrypted + connection via STARTTLS. Even if that + fails (e.g. if HOST does not support TLS), retain + an unencrypted connection. + `plain' -- An ordinary, unencrypted network connection. + `starttls' -- Begin with an ordinary connection, and try + upgrading via STARTTLS. If that fails for any + reason, drop the connection; in that case the + returned object is a killed process. + `tls' -- A TLS connection. + `ssl' -- Equivalent to `tls'. `shell' -- A shell connection. :return-list specifies this function's return value. @@ -85,16 +88,15 @@ PARAMETERS should be a sequence of keywords and values: :greeting -- the greeting returned by HOST (a string), or nil. :capabilities -- a string representing HOST's capabilities, or nil if none could be found. - :type -- the actual connection type; either `default' for an - unencrypted connection, or `tls'. + :type -- the resulting connection type; `plain' (unencrypted) + or `tls' (TLS-encrypted). :end-of-command specifies a regexp matching the end of a command. If non-nil, it defaults to \"\\n\". :success specifies a regexp matching a message indicating a successful STARTTLS negotiation. For instance, the default - should be \"^3\" for an NNTP connection. If this is not - supplied, STARTTLS will always fail. + should be \"^3\" for an NNTP connection. :capability-command specifies a command used to query the HOST for its capabilities. For instance, for IMAP this should be @@ -106,27 +108,24 @@ PARAMETERS should be a sequence of keywords and values: STARTTLS if the server supports STARTTLS, and nil otherwise." (let ((type (plist-get parameters :type)) (return-list (plist-get parameters :return-list))) - (if (and (null return-list) (memq type '(nil default))) - ;; The simplest case---no encryption, and no need to report - ;; connection properties. Like `open-network-stream', this - ;; doesn't read anything into BUFFER yet. + (if (and (not return-list) + (or (eq type 'plain) + (and (memq type '(nil network)) + (not (and (plist-get parameters :success) + (plist-get parameters :capability-command)))))) + ;; The simplest case is equivalent to `open-network-stream'. (open-network-stream name buffer host service) ;; For everything else, refer to proto-stream-open-*. (unless (plist-get parameters :end-of-command) - (setq parameters - (append '(:end-of-command "\r\n") parameters))) + (setq parameters (append '(:end-of-command "\r\n") parameters))) (let* ((connection-function (cond - ((memq type '(nil default)) - 'proto-stream-open-default) - ((memq type '(try-starttls starttls)) + ((eq type 'plain) 'proto-stream-open-plain) + ((memq type '(nil network starttls)) 'proto-stream-open-starttls) - ((memq type '(tls ssl)) - 'proto-stream-open-tls) - ((eq type 'shell) - 'proto-stream-open-shell) - (t - (error "Invalid connection type %s" type)))) + ((memq type '(tls ssl)) 'proto-stream-open-tls) + ((eq type 'shell) 'proto-stream-open-shell) + (t (error "Invalid connection type %s" type)))) (result (funcall connection-function name buffer host service parameters))) (if return-list @@ -136,19 +135,18 @@ PARAMETERS should be a sequence of keywords and values: :type (nth 3 result)) (car result)))))) -(defun proto-stream-open-default (name buffer host service parameters) +(defun proto-stream-open-plain (name buffer host service parameters) (let ((start (with-current-buffer buffer (point))) (stream (open-network-stream name buffer host service))) (list stream (proto-stream-get-response stream start (plist-get parameters :end-of-command)) nil - 'default))) + 'plain))) (defun proto-stream-open-starttls (name buffer host service parameters) (let* ((start (with-current-buffer buffer (point))) - ;; This should be `starttls' or `try-starttls'. - (type (plist-get parameters :type)) + (require-tls (eq (plist-get parameters :type) 'starttls)) (starttls-function (plist-get parameters :starttls-function)) (success-string (plist-get parameters :success)) (capability-command (plist-get parameters :capability-command)) @@ -159,7 +157,7 @@ PARAMETERS should be a sequence of keywords and values: (capabilities (when capability-command (proto-stream-command stream capability-command eoc))) - (resulting-type 'default) + (resulting-type 'plain) starttls-command) ;; If we have STARTTLS support, try to upgrade the connection. @@ -175,11 +173,11 @@ PARAMETERS should be a sequence of keywords and values: (setq start (with-current-buffer buffer (point-max))) (let* ((starttls-use-gnutls t) (starttls-extra-arguments - (if (not (eq type 'starttls)) - ;; For opportunistic TLS upgrades, we don't - ;; really care about the identity of the peer. - (cons "--insecure" starttls-extra-arguments) - starttls-extra-arguments))) + (if require-tls + starttls-extra-arguments + ;; For opportunistic TLS upgrades, we don't really + ;; care about the identity of the peer. + (cons "--insecure" starttls-extra-arguments)))) (setq stream (starttls-open-stream name buffer host service))) (proto-stream-get-response stream start eoc)) (when (string-match success-string @@ -193,7 +191,7 @@ PARAMETERS should be a sequence of keywords and values: (setq resulting-type 'tls) ;; We didn't successfully negotiate STARTTLS; if TLS ;; isn't demanded, reopen an unencrypted connection. - (when (eq type 'try-starttls) + (unless require-tls (setq stream (open-network-stream name buffer host service)) (proto-stream-get-response stream start eoc))) ;; Re-get the capabilities, which may have now changed. @@ -201,8 +199,8 @@ PARAMETERS should be a sequence of keywords and values: (proto-stream-command stream capability-command eoc)))) ;; If TLS is mandatory, close the connection if it's unencrypted. - (and (eq type 'starttls) - (eq resulting-type 'default) + (and require-tls + (eq resulting-type 'plain) (delete-process stream)) ;; Return value: (list stream greeting capabilities resulting-type))) @@ -237,7 +235,7 @@ PARAMETERS should be a sequence of keywords and values: name buffer host service)) (eoc (plist-get parameters :end-of-command))) (if (null stream) - (list nil nil nil 'default) + (list nil nil nil 'plain) ;; If we're using tls.el, we have to delete the output from ;; openssl/gnutls-cli. (unless (fboundp 'open-gnutls-stream) @@ -260,7 +258,7 @@ PARAMETERS should be a sequence of keywords and values: (format-spec-make ?s host ?p service)))) - parameters 'default)) + parameters 'plain)) (defun proto-stream-capability-open (start stream parameters stream-type) (let* ((capability-command (plist-get parameters :capability-command)) From 888adce96c1a551c975718bd8ad540525b1f408c Mon Sep 17 00:00:00 2001 From: Zachary Kanfer Date: Wed, 30 Mar 2011 09:35:37 -0400 Subject: [PATCH 163/166] * src/keyboard.c (Fexecute_extended_command): Do log the "suggest key binding" message. Fixes: debbugs:7967 --- src/ChangeLog | 5 +++++ src/keyboard.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 973b7712e53..2df49ff31bc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-30 Zachary Kanfer (tiny change) + + * keyboard.c (Fexecute_extended_command): Do log the "suggest key + binding" message (bug#7967). + 2011-03-30 Paul Eggert Fix more problems found by GCC 4.6.0's static checks. diff --git a/src/keyboard.c b/src/keyboard.c index 86a2b3e8abd..70098d46ebb 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -10340,9 +10340,9 @@ give to the command you invoke, if it asks for an argument. */) sprintf (newmessage, "You can run the command `%s' with %s", SDATA (SYMBOL_NAME (function)), SDATA (binding)); - message2_nolog (newmessage, - strlen (newmessage), - STRING_MULTIBYTE (binding)); + message2 (newmessage, + strlen (newmessage), + STRING_MULTIBYTE (binding)); if (NUMBERP (Vsuggest_key_bindings)) waited = sit_for (Vsuggest_key_bindings, 0, 2); else From a5954fa5c84101c99857ea65196ef9050138119f Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Wed, 30 Mar 2011 14:59:42 +0000 Subject: [PATCH 164/166] Merge Gnus' changes. gnus.texi (Listing Groups): Document gnus-group-list-ticked. gssapi.el (open-gssapi-stream): Remove the last mentions of the IMAP stuff. gnus-score.el (gnus-score-string): Fix calling convention of `gnus-simplify-buffer-fuzzy' after last patches. gnus-sum.el (gnus-update-marks): Don't send any marks updates to the server for articles we didn't get any headers for. This is a sanity check. nnimap.el (nnimap-open-connection-1): Is the login responds with a new CAPABILITY, use it. gnus-agent.el (gnus-agent-fetch-headers): Don't message if we're not downloading anything. gnus.el (gnus-splash-svg-color-symbols): Removed superfluous `and'. gnus.el (gnus-group-startup-message): Prefer svg file and replace colors. (gnus-splash-svg-color-symbols): New function. gnus-sum.el (gnus-simplify-buffer-fuzzy): Take the regexp explicitly instead of using the global gnus-simplify-subject-fuzzy-regexp. (gnus-simplify-subject-fuzzy): Use the local gnus-simplify-subject-fuzzy-regex instead of the global one. This makes using this variable in group parameters work. gnus-registry.el (gnus-registry-unfollowed-groups): Add "archive:sent" to the unfollowed group regex (for the recent Gnus archive:sent-YYYY-MM-DD groups). (gnus-registry-split-fancy-with-parent): Bail out early in sender tracking if there are more than `gnus-registry-max-track-groups' matches. message.el (message--yank-original-internal): New function to do the insertion cleanly inside eval in `message-yank-original'. (message-yank-original): Use it. --- doc/misc/ChangeLog | 4 +++ doc/misc/gnus.texi | 5 ++++ lisp/gnus/ChangeLog | 53 ++++++++++++++++++++++++++++++++++++++ lisp/gnus/gnus-agent.el | 7 ++--- lisp/gnus/gnus-registry.el | 40 ++++++++++++++-------------- lisp/gnus/gnus-score.el | 2 +- lisp/gnus/gnus-sum.el | 49 +++++++++++++++++++++-------------- lisp/gnus/gnus.el | 25 +++++++++++++++--- lisp/gnus/gssapi.el | 14 +++++----- lisp/gnus/message.el | 33 +++++++++++++----------- lisp/gnus/nnimap.el | 15 ++++++++--- 11 files changed, 174 insertions(+), 73 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 50f0e4e45b9..1c29d2598a8 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2011-03-19 Antoine Levitt + + * gnus.texi (Listing Groups): Document gnus-group-list-ticked + 2011-03-17 Jay Belanger * calc.texi (Logarithmic Units): Update the function names. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index b55452cfa82..9771392f0cc 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -3320,6 +3320,11 @@ List all groups with cached articles (@code{gnus-group-list-cached}). @findex gnus-group-list-dormant List all groups with dormant articles (@code{gnus-group-list-dormant}). +@item A ! +@kindex A ! (Group) +@findex gnus-group-list-ticked +List all groups with ticked articles (@code{gnus-group-list-ticked}). + @item A / @kindex A / (Group) @findex gnus-group-list-limit diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index f6b7db61d96..51169f7b9df 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -15,6 +15,59 @@ nntp-open-plain-stream value. (nntp-open-connection): Recognize that value. +2011-03-29 Lars Magne Ingebrigtsen + + * gssapi.el (open-gssapi-stream): Remove the last mentions of the IMAP + stuff. + + * gnus-score.el (gnus-score-string): Fix calling convention of + `gnus-simplify-buffer-fuzzy' after last patches. + + * gnus-sum.el (gnus-update-marks): Don't send any marks updates to the + server for articles we didn't get any headers for. This is a sanity + check. + +2011-03-29 Michael Welsh Duggan + + * nnimap.el (nnimap-open-connection-1): Is the login responds with a + new CAPABILITY, use it. + +2011-03-29 Lars Magne Ingebrigtsen + + * gnus-agent.el (gnus-agent-fetch-headers): Don't message if we're not + downloading anything. + + * gnus.el (gnus-splash-svg-color-symbols): Removed superfluous `and'. + +2011-03-29 Adam Sjøgren + + * gnus.el (gnus-group-startup-message): Prefer svg file and replace + colors. + (gnus-splash-svg-color-symbols): New function. + +2011-03-29 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-simplify-buffer-fuzzy): Take the regexp explicitly + instead of using the global gnus-simplify-subject-fuzzy-regexp. + (gnus-simplify-subject-fuzzy): Use the local + gnus-simplify-subject-fuzzy-regex instead of the global one. This + makes using this variable in group parameters work. + +2011-03-29 Teodor Zlatanov + + * gnus-registry.el (gnus-registry-unfollowed-groups): Add + "archive:sent" to the unfollowed group regex (for the recent Gnus + archive:sent-YYYY-MM-DD groups). + (gnus-registry-split-fancy-with-parent): Bail out early in sender + tracking if there are more than `gnus-registry-max-track-groups' + matches. + +2011-03-29 Stefan Monnier + + * message.el (message--yank-original-internal): New function to do the + insertion cleanly inside eval in `message-yank-original'. + (message-yank-original): Use it. + 2011-03-29 Julien Danjou * mm-view.el (mm-display-inline-fontify): Use `set-normal-mode' with diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 989488c0995..52fbe9da11f 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -1925,9 +1925,10 @@ article numbers will be returned." (setq articles (gnus-list-range-intersection articles (list (cons low high))))))) - (gnus-message - 10 "gnus-agent-fetch-headers: undownloaded articles are '%s'" - (gnus-compress-sequence articles t)) + (when articles + (gnus-message + 10 "gnus-agent-fetch-headers: undownloaded articles are '%s'" + (gnus-compress-sequence articles t))) (with-current-buffer nntp-server-buffer (if articles diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index cef173ce1ec..db3cc06e9aa 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -124,7 +124,7 @@ display." :type 'symbol) (defcustom gnus-registry-unfollowed-groups - '("delayed$" "drafts$" "queue$" "INBOX$" "^nnmairix:") + '("delayed$" "drafts$" "queue$" "INBOX$" "^nnmairix:" "archive") "List of groups that gnus-registry-split-fancy-with-parent won't return. The group names are matched, they don't have to be fully qualified. This parameter tells the Registry 'never split a @@ -541,24 +541,26 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." user-mail-address))) (maphash (lambda (key value) - (let ((this-sender (cdr - (gnus-registry-fetch-extra key 'sender))) - matches) - (when (and this-sender - (equal sender this-sender)) - (let ((groups (gnus-registry-fetch-groups - key - gnus-registry-max-track-groups))) - (dolist (group groups) - (when (and group (gnus-registry-follow-group-p group)) - (push group found-full) - (setq found (append (list group) (delete group found)))))) - (push key matches) - (gnus-message - ;; raise level of messaging if gnus-registry-track-extra - (if gnus-registry-track-extra 7 9) - "%s (extra tracking) traced sender %s to groups %s (keys %s)" - log-agent sender found matches)))) + ;; don't use more than gnus-registry-max-track-groups + (when (< (length found-full) gnus-registry-max-track-groups) + (let ((this-sender + (cdr (gnus-registry-fetch-extra key 'sender))) + matches) + (when (and this-sender + (equal sender this-sender)) + (let ((groups (gnus-registry-fetch-groups + key + gnus-registry-max-track-groups))) + (dolist (group groups) + (when (and group (gnus-registry-follow-group-p group)) + (push group found-full) + (setq found (append (list group) (delete group found)))))) + (push key matches) + (gnus-message + ;; raise level of messaging if gnus-registry-track-extra + (if gnus-registry-track-extra 7 9) + "%s (extra tracking) traced sender %s to groups %s (keys %s)" + log-agent sender found matches))))) gnus-registry-hashtb) ;; filter the found groups and return them ;; the found groups are NOT the full groups diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index e376b7a7b6e..9bbfbfb057e 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -2151,7 +2151,7 @@ score in `gnus-newsgroup-scored' by SCORE." ;; Find fuzzy matches. (when fuzzies ;; Simplify the entire buffer for easy matching. - (gnus-simplify-buffer-fuzzy) + (gnus-simplify-buffer-fuzzy gnus-simplify-subject-fuzzy-regexp) (while (setq kill (cadaar fuzzies)) (let* ((match (nth 0 kill)) (type (nth 3 kill)) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 9b22bbe39da..91dc6fb9595 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -1734,7 +1734,7 @@ If RE-ONLY is non-nil, strip leading `Re:'s only." (while (re-search-forward regexp nil t) (replace-match (or newtext "")))) -(defun gnus-simplify-buffer-fuzzy () +(defun gnus-simplify-buffer-fuzzy (regexp) "Simplify string in the buffer fuzzily. The string in the accessible portion of the current buffer is simplified. It is assumed to be a single-line subject. @@ -1748,11 +1748,10 @@ matter is removed. Additional things can be deleted by setting (while (not (eq modified-tick (buffer-modified-tick))) (setq modified-tick (buffer-modified-tick)) (cond - ((listp gnus-simplify-subject-fuzzy-regexp) - (mapc 'gnus-simplify-buffer-fuzzy-step - gnus-simplify-subject-fuzzy-regexp)) - (gnus-simplify-subject-fuzzy-regexp - (gnus-simplify-buffer-fuzzy-step gnus-simplify-subject-fuzzy-regexp))) + ((listp regexp) + (mapc 'gnus-simplify-buffer-fuzzy-step regexp)) + (regexp + (gnus-simplify-buffer-fuzzy-step regexp))) (gnus-simplify-buffer-fuzzy-step "^ *\\[[-+?*!][-+?*!]\\] *") (gnus-simplify-buffer-fuzzy-step "^ *\\(re\\|fw\\|fwd\\)[[{(^0-9]*[])}]?[:;] *") @@ -1767,15 +1766,16 @@ matter is removed. Additional things can be deleted by setting "Simplify a subject string fuzzily. See `gnus-simplify-buffer-fuzzy' for details." (save-excursion - (gnus-set-work-buffer) - (let ((case-fold-search t)) - ;; Remove uninteresting prefixes. - (when (and gnus-simplify-ignored-prefixes - (string-match gnus-simplify-ignored-prefixes subject)) - (setq subject (substring subject (match-end 0)))) - (insert subject) - (inline (gnus-simplify-buffer-fuzzy)) - (buffer-string)))) + (let ((regexp gnus-simplify-subject-fuzzy-regexp)) + (gnus-set-work-buffer) + (let ((case-fold-search t)) + ;; Remove uninteresting prefixes. + (when (and gnus-simplify-ignored-prefixes + (string-match gnus-simplify-ignored-prefixes subject)) + (setq subject (substring subject (match-end 0)))) + (insert subject) + (inline (gnus-simplify-buffer-fuzzy regexp)) + (buffer-string))))) (defsubst gnus-simplify-subject-fully (subject) "Simplify a subject string according to `gnus-summary-gather-subject-limit'." @@ -6068,14 +6068,23 @@ If SELECT-ARTICLES, only select those articles from GROUP." 'request-set-mark gnus-newsgroup-name) (not (gnus-article-unpropagatable-p (cdr type)))) (let* ((old (cdr (assq (cdr type) (gnus-info-marks info)))) - (del (gnus-remove-from-range (gnus-copy-sequence old) list)) - (add (gnus-remove-from-range - (gnus-copy-sequence list) old))) + ;; Don't do anything about marks for articles we + ;; didn't actually get any headers for. + (existing (gnus-compress-sequence gnus-newsgroup-articles)) + (del + (gnus-sorted-range-intersection + existing + (gnus-remove-from-range (gnus-copy-sequence old) list))) + (add + (gnus-sorted-range-intersection + existing + (gnus-remove-from-range + (gnus-copy-sequence list) old)))) (when add (push (list add 'add (list (cdr type))) delta-marks)) (when del - ;; Don't delete marks from outside the active range. This - ;; shouldn't happen, but is a sanity check. + ;; Don't delete marks from outside the active range. + ;; This shouldn't happen, but is a sanity check. (setq del (gnus-sorted-range-intersection (gnus-active gnus-newsgroup-name) del)) (push (list del 'del (list (cdr type))) delta-marks)))) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 57d085a0380..d4ecd89db92 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -1043,12 +1043,15 @@ be set in `.emacs' instead." ((boundp 'image-load-path) (symbol-value 'image-load-path)) (t load-path))) - (image (find-image - `((:type xpm :file "gnus.xpm" + (image (gnus-splash-svg-color-symbols (find-image + `((:type svg :file "gnus.svg" + :color-symbols + (("#bf9900" . ,(car gnus-logo-colors)) + ("#ffcc00" . ,(cadr gnus-logo-colors)))) + (:type xpm :file "gnus.xpm" :color-symbols (("thing" . ,(car gnus-logo-colors)) ("shadow" . ,(cadr gnus-logo-colors)))) - (:type svg :file "gnus.svg") (:type png :file "gnus.png") (:type pbm :file "gnus.pbm" ;; Account for the pbm's background. @@ -1057,7 +1060,7 @@ be set in `.emacs' instead." (:type xbm :file "gnus.xbm" ;; Account for the xbm's background. :background ,(face-foreground 'gnus-splash) - :foreground ,(face-background 'default)))))) + :foreground ,(face-background 'default))))))) (when image (let ((size (image-size image))) (insert-char ?\n (max 0 (round (- (window-height) @@ -1103,6 +1106,20 @@ be set in `.emacs' instead." (setq mode-line-buffer-identification (concat " " gnus-version)) (set-buffer-modified-p t))) +(defun gnus-splash-svg-color-symbols (list) + "Do color-symbol search-and-replace in svg file" + (let ((type (plist-get (cdr list) :type)) + (file (plist-get (cdr list) :file)) + (color-symbols (plist-get (cdr list) :color-symbols))) + (if (string= type "svg") + (let ((data (with-temp-buffer (insert-file file) (buffer-string)))) + (mapc (lambda (rule) + (setq data (replace-regexp-in-string + (concat "fill:" (car rule)) + (concat "fill:" (cdr rule)) data))) color-symbols) + (cons (car list) (list :type type :data data))) + list))) + (eval-when (load) (let ((command (format "%s" this-command))) (when (string-match "gnus" command) diff --git a/lisp/gnus/gssapi.el b/lisp/gnus/gssapi.el index 3765fb84ee8..e96c23b14ac 100644 --- a/lisp/gnus/gssapi.el +++ b/lisp/gnus/gssapi.el @@ -33,14 +33,14 @@ "--authentication-id %l") "imtest -m gssapi -u %l -p %p %s") "List of strings containing commands for GSSAPI (krb5) authentication. -%s is replaced with server hostname, %p with port to connect to, and -%l with the value of `imap-default-user'. The program should accept -IMAP commands on stdin and return responses to stdout. Each entry in -the list is tried until a successful connection is made." +%s is replaced with server hostname, %p with port to connect to, +and %l with the user name. The program should accept commands on +stdin and return responses to stdout. Each entry in the list is +tried until a successful connection is made." :group 'network :type '(repeat string)) -(defun open-gssapi-stream (name buffer server port) +(defun open-gssapi-stream (name buffer server port user) (let ((cmds gssapi-program) cmd done) (with-current-buffer buffer @@ -57,7 +57,7 @@ the list is tried until a successful connection is made." (format-spec-make ?s server ?p (number-to-string port) - ?l imap-default-user)))) + ?l user)))) response) (when process (while (and (memq (process-status process) '(open run)) @@ -92,7 +92,7 @@ the list is tried until a successful connection is made." (accept-process-output process 1) (sit-for 1)) (erase-buffer) - (message "GSSAPI IMAP connection: %s" (or response "failed")) + (message "GSSAPI connection: %s" (or response "failed")) (if (and response (let ((case-fold-search nil)) (not (string-match "failed" response)))) (setq done process) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index bb9215aca7c..6d9fd712c33 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -3712,22 +3712,9 @@ To use this automatically, you may add this function to (while (re-search-forward citexp nil t) (replace-match (if remove "" "\n")))))) -(defun message-yank-original (&optional arg) - "Insert the message being replied to, if any. -Puts point before the text and mark after. -Normally indents each nonblank line ARG spaces (default 3). However, -if `message-yank-prefix' is non-nil, insert that prefix on each line. - -This function uses `message-cite-function' to do the actual citing. - -Just \\[universal-argument] as argument means don't indent, insert no -prefix, and don't delete any headers." - (interactive "P") +(defun message--yank-original-internal (arg) (let ((modified (buffer-modified-p)) body-text) - ;; eval the let forms contained in message-cite-style - (eval - `(let ,message-cite-style (when (and message-reply-buffer message-cite-function) (when (equal message-cite-reply-position 'above) @@ -3767,7 +3754,23 @@ prefix, and don't delete any headers." ;; Add a `message-setup-very-last-hook' here? ;; Add `gnus-article-highlight-citation' here? (unless modified - (setq message-checksum (message-checksum)))))))) + (setq message-checksum (message-checksum)))))) + +(defun message-yank-original (&optional arg) + "Insert the message being replied to, if any. +Puts point before the text and mark after. +Normally indents each nonblank line ARG spaces (default 3). However, +if `message-yank-prefix' is non-nil, insert that prefix on each line. + +This function uses `message-cite-function' to do the actual citing. + +Just \\[universal-argument] as argument means don't indent, insert no +prefix, and don't delete any headers." + (interactive "P") + ;; eval the let forms contained in message-cite-style + (eval + `(let ,message-cite-style + (message--yank-original-internal ',arg)))) (defun message-yank-buffer (buffer) "Insert BUFFER into the current buffer and quote it." diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index ccb082d6c71..fa09c7ff165 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -410,11 +410,18 @@ textual parts.") (setq login-result (nnimap-login (car credentials) (cadr credentials)))) (if (car login-result) - ;; save the credentials if a save function exists + (progn + ;; Save the credentials if a save function exists ;; (such a function will only be passed if a new - ;; token was created) - (when (functionp (nth 2 credentials)) - (funcall (nth 2 credentials))) + ;; token was created). + (when (functionp (nth 2 credentials)) + (funcall (nth 2 credentials))) + ;; See if CAPABILITY is set as part of login + ;; response. + (dolist (response (cddr login-result)) + (when (string= "CAPABILITY" (upcase (car response))) + (setf (nnimap-capabilities nnimap-object) + (mapcar #'upcase (cdr response)))))) ;; If the login failed, then forget the credentials ;; that are now possibly cached. (dolist (host (list (nnoo-current-server 'nnimap) From 1c470562971bd86b1767ceb9ae95ece71228549f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 30 Mar 2011 14:04:11 -0400 Subject: [PATCH 165/166] * src/bytecode.c (Fbyte_code): CAR and CDR can GC. --- src/ChangeLog | 4 ++++ src/bytecode.c | 25 ++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2df49ff31bc..0b0ed2ed775 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-30 Stefan Monnier + + * bytecode.c (Fbyte_code): CAR and CDR can GC. + 2011-03-30 Zachary Kanfer (tiny change) * keyboard.c (Fexecute_extended_command): Do log the "suggest key diff --git a/src/bytecode.c b/src/bytecode.c index ce2f06dfccb..a7be8e26f27 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -554,7 +554,16 @@ If the third argument is incorrect, Emacs may crash. */) { Lisp_Object v1; v1 = TOP; - TOP = CAR (v1); + if (CONSP (v1)) + TOP = XCAR (v1); + else if (NILP (v1)) + TOP = Qnil; + else + { + BEFORE_POTENTIAL_GC (); + wrong_type_argument (Qlistp, v1); + AFTER_POTENTIAL_GC (); + } break; } @@ -580,7 +589,17 @@ If the third argument is incorrect, Emacs may crash. */) { Lisp_Object v1; v1 = TOP; - TOP = CDR (v1); + if (CONSP (v1)) + TOP = XCDR (v1); + else if (NILP (v1)) + TOP = Qnil; + else + { + BEFORE_POTENTIAL_GC (); + wrong_type_argument (Qlistp, v1); + AFTER_POTENTIAL_GC (); + } + break; break; } @@ -911,13 +930,13 @@ If the third argument is incorrect, Emacs may crash. */) v1 = POP; v2 = TOP; CHECK_NUMBER (v2); - AFTER_POTENTIAL_GC (); op = XINT (v2); immediate_quit = 1; while (--op >= 0 && CONSP (v1)) v1 = XCDR (v1); immediate_quit = 0; TOP = CAR (v1); + AFTER_POTENTIAL_GC (); break; } From 44f230aa043ebb222aa0876b44d70484d5dd38db Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 30 Mar 2011 15:18:12 -0400 Subject: [PATCH 166/166] * src/eval.c (struct backtrace): Don't cheat with negative numbers, but do steal a few bits to be more compact. (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace): Remove unneeded casts. --- src/ChangeLog | 77 +++++++++++++++++++++++++++------------------------ src/eval.c | 32 +++++++++++---------- 2 files changed, 59 insertions(+), 50 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0b0ed2ed775..a6623803a6e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-03-30 Stefan Monnier + * eval.c (struct backtrace): Don't cheat with negative numbers, but do + steal a few bits to be more compact. + (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace): + Remove unneeded casts. + * bytecode.c (Fbyte_code): CAR and CDR can GC. 2011-03-30 Zachary Kanfer (tiny change) @@ -344,8 +349,8 @@ (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298). Make tparam.h and terminfo.c consistent. - * cm.c (tputs, tgoto, BC, UP): Remove extern decls. Include - tparam.h instead, since it declares them. + * cm.c (tputs, tgoto, BC, UP): Remove extern decls. + Include tparam.h instead, since it declares them. * cm.h (PC): Remove extern decl; tparam.h now does this. * deps.mk (cm.o, terminfo.o): Depend on tparam.h. * terminfo.c: Include tparam.h, to check interfaces. @@ -391,8 +396,8 @@ * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else". - * atimer.c (start_atimer, append_atimer_lists, set_alarm): Rename - locals to avoid shadowing. + * atimer.c (start_atimer, append_atimer_lists, set_alarm): + Rename locals to avoid shadowing. * sound.c (wav_play, au_play, Fplay_sound_internal): Fix pointer signedness. @@ -561,8 +566,8 @@ gcc -Wbad-function-cast warning. (default_value, arithcompare, arith_driver, arith_error): Now static. (store_symval_forwarding): Rename local to avoid shadowing. - (Fmake_variable_buffer_local, Fmake_local_variable): Mark - variables as initialized. + (Fmake_variable_buffer_local, Fmake_local_variable): + Mark variables as initialized. (do_blv_forwarding, do_symval_forwarding): Remove; unused. * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. @@ -816,8 +821,8 @@ (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219). These macros can no longer be used for assignment. - * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Assign - struct members directly, instead of using BUF_BEGV etc. + * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): + Assign struct members directly, instead of using BUF_BEGV etc. (record_buffer_markers, fetch_buffer_markers): New functions for recording and fetching special buffer markers. (set_buffer_internal_1, set_buffer_temp): Use them. @@ -938,8 +943,8 @@ * term.c (encode_terminal_code): Now external again, used by w32console.c and msdos.c. - * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)): Depend - on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu. + * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)): + Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu. 2011-03-11 Paul Eggert @@ -1003,8 +1008,8 @@ (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN. (x_connection_closed): Tell GCC not to suggest NO_RETURN. - * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename - or move locals to avoid shadowing. + * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): + Rename or move locals to avoid shadowing. (tty_defined_color, merge_face_heights): Now static. (free_realized_faces_for_fontset): Remove; not used. (Fx_list_fonts): Mark variable that gcc -Wuninitialized @@ -1162,12 +1167,12 @@ (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen. (xg_prepare_tooltip, create_dialog, menubar_map_cb) (xg_update_frame_menubar, xg_tool_bar_detach_callback) - (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): Call - gtk_widget_get_preferred_size. + (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): + Call gtk_widget_get_preferred_size. (xg_frame_resized): gdk_window_get_geometry only takes 5 parameters. - (xg_win_to_widget, xg_event_is_for_menubar): Call - gdk_x11_window_lookup_for_display. + (xg_win_to_widget, xg_event_is_for_menubar): + Call gdk_x11_window_lookup_for_display. (xg_set_widget_bg): New function. (delete_cb): New function. (xg_create_frame_widgets): connect delete-event to delete_cb. @@ -1263,7 +1268,7 @@ (produce_glyphless_glyph): Make a pointer "const" since it might point to immutable storage. (update_window_cursor): Now static, since it's not used elsewhere. - (SKIP_GLYPHS): Removed unused macro. + (SKIP_GLYPHS): Remove unused macro. 2011-03-06 Michael Shields (tiny change) @@ -7760,7 +7765,7 @@ * xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT) (handle_one_xevent, x_check_errors, xim_initialize, x_term_init): Likewise. - * character.h (BCOPY_SHORT): Removed. + * character.h (BCOPY_SHORT): Remove. * config.in: Regenerate. * dispnew.c (safe_bcopy): Only define as dummy if PROFILING. * emacs.c (main) [PROFILING]: Don't declare @@ -19549,7 +19554,7 @@ Set xftfont_info->ft_size. Don't unlock the face. Check BDF properties if appropriate. (xftfont_close): Unlock the face. - (xftfont_anchor_point, xftfont_shape): Deleted. + (xftfont_anchor_point, xftfont_shape): Delete. (syms_of_xftfont): Don't set members anchor_point and shape of xftfont_driver. @@ -21454,7 +21459,7 @@ Delete externs. (fontset_from_font_name): Extern it. (FS_LOAD_FONT, FONT_INFO_ID, FONT_INFO_FROM_ID) - (FONT_INFO_FROM_FACE): Deleted. + (FONT_INFO_FROM_FACE): Delete. (face_for_font): Adjust prototype. * fontset.c: Throughout the file, delete all USE_FONT_BACKEND @@ -21471,7 +21476,7 @@ (fontset_compare_rfontdef): New function. (reorder_font_vector): Remove the argument CHARSET-ID. Sort rfont-defs by qsort. Adjusted for the change of font-group vector. - (load_font_get_repertory): Deleted. + (load_font_get_repertory): Delete. (fontset_find_font): Use new macros to ref/set elements of font-def and rfont-def. (fontset_font): Fix the timing of remembering that no font for C. @@ -21487,11 +21492,11 @@ font-def. (Fnew_fontset): Use font_unparse_xlfd to generate FONTSET_ASCII (fontset). - (new_fontset_from_font_name): Deleted. + (new_fontset_from_font_name): Delete. (fontset_from_font): Rename from new_fontset_from_font. Check if a fontset is already created for the font. FIx updating of Vfontset_alias_alist. - (fontset_ascii_font): Deleted. + (fontset_ascii_font): Delete. (Ffont_info): Adjust for the format change of font-spec. (Finternal_char_font): Likewise. (Ffontset_info): Likewise. @@ -21519,7 +21524,7 @@ (ftfont_list): Return a list, not vector. (ftfont_match): Use ftfont_spec_pattern to get a pattern. (ftfont_list_family): Don't downcase names. - (ftfont_free_entity): Deleted. + (ftfont_free_entity): Delete. (ftfont_open): Return a font-object. Adjusted for the change of struct font. Get underline_thickness and underline_position from font property. Don't update dpyinfo->smallest_font_height and @@ -21571,13 +21576,13 @@ (QCfoundry, QCadstyle, QCregistry, QCspacing, QCsize, QCavgwidth) (Qp): Extern them. (clear_font_table, load_face_font, xlfd_lookup_field_contents): - Deleted. - (struct font_name): Deleted. - (xlfd_numeric_value, xlfd_symbolic_value): Deleted. + Delete. + (struct font_name): Delete. + (xlfd_numeric_value, xlfd_symbolic_value): Delete. (compare_fonts_by_sort_order): New function. (xlfd_numeric_slant, xlfd_symbolic_slant, xlfd_numeric_weight) (xlfd_symbolic_weight, xlfd_numeric_swidth, xlfd_symbolic_swidth): - Deleted. + Delete. (Fx_family_fonts): Use font_list_entities, and sort fonts by compare_fonts_by_sort_order. (Fx_font_family_list): Call Ffont_family_list. @@ -21590,9 +21595,9 @@ (free_font_names, sort_fonts, x_face_list_fonts) (face_font_available_p, sorted_font_list, cmp_font_names) (font_list_1, concat_font_list, font_list, remove_duplicates): - Deleted. + Delete. (Fx_list_fonts): Use Ffont_list. - (LFACE_AVGWIDTH): Deleted. + (LFACE_AVGWIDTH): Delete. (check_lface_attrs): Don't check LFACE_AVGWIDTH. Check LFACE_FONT by FONTP. (lface_fully_specified_p): Don't check LFACE_AVGWIDTH. @@ -21614,7 +21619,7 @@ (Fface_font): Get a font name from font->props[FONT_NAME_INDEX]. (lface_same_font_attributes_p): Don't check LFACE_AVGWIDTH. Compare fonts by EQ. - (lookup_non_ascii_face): Deleted. + (lookup_non_ascii_face): Delete. (face_for_font): The 2nd argument changed. (x_supports_face_attributes_p): Don't check LFACE_AVGWIDTH. Check atomic font properties by case insensitive. @@ -21637,7 +21642,7 @@ * xfont.c: Include and "ccl.h". (struct xfont_info): New structure. - (xfont_query_font): Deleted. + (xfont_query_font): Delete. (xfont_find_ccl_program): Rename from x_find_ccl_program and moved from xterm.c. (xfont_driver): Adjust for the change of struct font_driver. @@ -21653,7 +21658,7 @@ dpyinfo->smallest_char_width. (xfont_close): Don't free struct font. (xfont_prepare_face): Adjust for the change of struct font. - (xfont_done_face): Deleted. + (xfont_done_face): Delete. (xfont_has_char): Adjust for the change of struct font. (xfont_encode_char, xfont_draw): Likewise. (xfont_check): New function. @@ -21683,7 +21688,7 @@ * xterm.c: Throughout the file, delete all USE_FONT_BACKEND conditionals. Don't check enable_font_backend. Delete all codes used only when USE_FONT_BACKEND is not defined. Don't include ccl.h. - (x_per_char_metric, x_encode_char): Deleted. + (x_per_char_metric, x_encode_char): Delete. (x_set_cursor_gc, x_set_mouse_face_gc): Don't set GCFont. (x_compute_glyph_string_overhangs): Adjust for the change of `struct face'. @@ -21692,10 +21697,10 @@ (x_draw_glyph_string): Likewise. Use font->underline_position and font->underline_thickness. (x_new_font): Rename from x_new_fontset2. - (x_new_fontset, x_get_font_info, x_list_fonts): Deleted. + (x_new_fontset, x_get_font_info, x_list_fonts): Delete. (x_check_font): Call `check' method of a font driver. (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font) - (x_query_font, x_get_font_repertory): Deleted. + (x_query_font, x_get_font_repertory): Delete. (x_find_ccl_program): Rename and moved to xfont.c. (x_redisplay_interface): Adjust for the change of `struct redisplay_interface'. diff --git a/src/eval.c b/src/eval.c index 26aea3df5df..718e58c693f 100644 --- a/src/eval.c +++ b/src/eval.c @@ -38,16 +38,20 @@ struct backtrace struct backtrace *next; Lisp_Object *function; Lisp_Object *args; /* Points to vector of args. */ - size_t nargs; /* Length of vector. - If nargs is (size_t) UNEVALLED, args points - to slot holding list of unevalled args. */ - char evalargs; +#define NARGS_BITS (BITS_PER_INT - 2) + /* Let's not use size_t because we want to allow negative values (for + UNEVALLED). Also let's steal 2 bits so we save a word (or more for + alignment). In any case I doubt Emacs would survive a function call with + more than 500M arguments. */ + int nargs : NARGS_BITS; /* Length of vector. + If nargs is UNEVALLED, args points + to slot holding list of unevalled args. */ + char evalargs : 1; /* Nonzero means call value of debugger when done with this operation. */ - char debug_on_exit; + char debug_on_exit : 1; }; struct backtrace *backtrace_list; - struct catchtag *catchlist; #ifdef DEBUG_GCPRO @@ -553,7 +557,7 @@ interactive_p (int exclude_subrs_p) looking at several frames for special forms. Skip past them. */ while (btp && (EQ (*btp->function, Qbytecode) - || btp->nargs == (size_t) UNEVALLED)) + || btp->nargs == UNEVALLED)) btp = btp->next; /* `btp' now points at the frame of the innermost function that isn't @@ -3335,7 +3339,7 @@ Output stream used is value of `standard-output'. */) while (backlist) { write_string (backlist->debug_on_exit ? "* " : " ", 2); - if (backlist->nargs == (size_t) UNEVALLED) + if (backlist->nargs == UNEVALLED) { Fprin1 (Fcons (*backlist->function, *backlist->args), Qnil); write_string ("\n", -1); @@ -3345,8 +3349,8 @@ Output stream used is value of `standard-output'. */) tem = *backlist->function; Fprin1 (tem, Qnil); /* This can QUIT. */ write_string ("(", -1); - if (backlist->nargs == (size_t) MANY) - { + if (backlist->nargs == MANY) + { /* FIXME: Can this happen? */ int i; for (tail = *backlist->args, i = 0; !NILP (tail); @@ -3399,11 +3403,11 @@ If NFRAMES is more than the number of frames, the value is nil. */) if (!backlist) return Qnil; - if (backlist->nargs == (size_t) UNEVALLED) + if (backlist->nargs == UNEVALLED) return Fcons (Qnil, Fcons (*backlist->function, *backlist->args)); else { - if (backlist->nargs == (size_t) MANY) + if (backlist->nargs == MANY) /* FIXME: Can this happen? */ tem = *backlist->args; else tem = Flist (backlist->nargs, backlist->args); @@ -3423,8 +3427,8 @@ mark_backtrace (void) { mark_object (*backlist->function); - if (backlist->nargs == (size_t) UNEVALLED - || backlist->nargs == (size_t) MANY) + if (backlist->nargs == UNEVALLED + || backlist->nargs == MANY) /* FIXME: Can this happen? */ i = 1; else i = backlist->nargs;