------------------------------------------------------------ revno: 117119 fixes bug: http://debbugs.gnu.org/17487 committer: Paul Eggert branch nick: trunk timestamp: Sat 2014-05-17 01:11:31 -0700 message: Assume C99 or later. * lib/stdarg.in.h, lib/stdbool.in.h, m4/stdarg.m4, m4/stdbool.m4: Remove. * configure.ac (_AC_PROG_CC_C89): Define a dummy, to keep 'configure' smaller. (gl_PROG_CC_C99): Use this to get C99 or later. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * admin/merge-gnulib (GNULIB_MODULES): Remove stdarg, stdbool. (GNULIB_TOOL_FLAGS): Avoid stdarg, stdbool. * doc/lispref/internals.texi (C Dialect): Document this. * etc/NEWS: Document this. * nt/gnulib.mk: Remove stdarg and stdbool modules. * src/bytecode.c (B__dummy__): Remove. * src/conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool. (FLEXIBLE_ARRAY_MEMBER): Now always empty. * src/dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]: * src/regex.c (DEBUG_PRINT): Assume varargs macros. * src/lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99. diff: === modified file 'ChangeLog' --- ChangeLog 2014-05-16 15:49:13 +0000 +++ ChangeLog 2014-05-17 08:11:31 +0000 @@ -1,3 +1,13 @@ +2014-05-17 Paul Eggert + + Assume C99 or later (Bug#17487). + * lib/stdarg.in.h, lib/stdbool.in.h, m4/stdarg.m4, m4/stdbool.m4: + Remove. + * configure.ac (_AC_PROG_CC_C89): Define a dummy, to keep 'configure' + smaller. + (gl_PROG_CC_C99): Use this to get C99 or later. + * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. + 2014-05-16 Paul Eggert Don't require pkg-config when building from repository. === modified file 'admin/ChangeLog' --- admin/ChangeLog 2014-05-16 15:49:13 +0000 +++ admin/ChangeLog 2014-05-17 08:11:31 +0000 @@ -1,3 +1,9 @@ +2014-05-17 Paul Eggert + + Assume C99 or later (Bug#17487). + * merge-gnulib (GNULIB_MODULES): Remove stdarg, stdbool. + (GNULIB_TOOL_FLAGS): Avoid stdarg, stdbool. + 2014-05-16 Paul Eggert Don't require pkg-config when building from repository. === modified file 'admin/merge-gnulib' --- admin/merge-gnulib 2014-05-13 23:15:01 +0000 +++ admin/merge-gnulib 2014-05-17 08:11:31 +0000 @@ -35,7 +35,7 @@ intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat - sig2str socklen stat-time stdalign stdarg stdbool stdio + sig2str socklen stat-time stdalign stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv update-copyright utimens @@ -49,6 +49,7 @@ --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask + --avoid=stdarg --avoid=stdbool --avoid=threadlib --conditional-dependencies --import --no-changelog --no-vc-files --makefile-name=gnulib.mk === modified file 'configure.ac' --- configure.ac 2014-05-16 19:03:07 +0000 +++ configure.ac 2014-05-17 08:11:31 +0000 @@ -670,6 +670,9 @@ #### Choose a compiler. +dnl Don't bother to test for C89. +AC_DEFUN([_AC_PROG_CC_C89], [$2]) + dnl Sets GCC=yes if using gcc. AC_PROG_CC([gcc cc cl clang "$XCRUN gcc" "$XCRUN clang"]) if test -n "$XCRUN"; then @@ -677,6 +680,9 @@ test -n "$AR" && export AR fi +dnl Emacs needs C99 or later. +gl_PROG_CC_C99 + AM_PROG_CC_C_O if test x$GCC = xyes; then @@ -1303,7 +1309,7 @@ CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" fi -# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better. +# Suppress obsolescent Autoconf test for size_t; Emacs assumes C99 or better. AC_DEFUN([AC_TYPE_SIZE_T]) # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. AC_DEFUN([AC_TYPE_UID_T]) === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-05-15 14:59:02 +0000 +++ doc/lispref/ChangeLog 2014-05-17 08:11:31 +0000 @@ -1,3 +1,8 @@ +2014-05-17 Paul Eggert + + Assume C99 or later (Bug#17487). + * internals.texi (C Dialect): Document this. + 2014-05-15 Dmitry Antipov * lists.texi (Building Cons Cells and Lists): Remove === modified file 'doc/lispref/internals.texi' --- doc/lispref/internals.texi 2014-05-08 03:41:21 +0000 +++ doc/lispref/internals.texi 2014-05-17 08:11:31 +0000 @@ -580,15 +580,14 @@ @section C Dialect @cindex C programming language -The C part of Emacs is portable to C89: C99-specific features such as -@samp{} and @samp{inline} are not used without a check, +The C part of Emacs is portable to C99 or later: C11-specific features such +as @samp{} and @samp{_Noreturn} are not used without a check, typically at configuration time, and the Emacs build procedure -provides a substitute implementation if necessary. Some C99 features, -such as declarations after statements, are too difficult to provide -substitutes for, so they are avoided entirely. +provides a substitute implementation if necessary. Some C11 features, +such as anonymous structures and unions, are too difficult to emulate, +so they are avoided entirely. -At some point in the not-too-distant future the base C dialect will -change from C89 to C99, and eventually it will no doubt change to C11. +At some point in the future the base C dialect will no doubt change to C11. @node Writing Emacs Primitives @section Writing Emacs Primitives === modified file 'etc/ChangeLog' --- etc/ChangeLog 2014-05-16 15:49:13 +0000 +++ etc/ChangeLog 2014-05-17 08:11:31 +0000 @@ -1,3 +1,7 @@ +2014-05-17 Paul Eggert + + * NEWS: Assume C99 or later (Bug#17487). + 2014-05-16 Paul Eggert Don't require pkg-config when building from repository. === modified file 'etc/NEWS' --- etc/NEWS 2014-05-16 15:49:13 +0000 +++ etc/NEWS 2014-05-17 08:11:31 +0000 @@ -25,6 +25,8 @@ * Installation Changes in Emacs 24.5 +++ +** Building Emacs now requires C99 or later. + ** Building Emacs now requires GNU make. ** By default, Emacs no longer works on IRIX. We expect that Emacs === modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2014-03-07 18:57:11 +0000 +++ lib/gnulib.mk 2014-05-17 08:11:31 +0000 @@ -21,7 +21,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=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv update-copyright utimens warnings +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv update-copyright utimens warnings MOSTLYCLEANFILES += core *.stackdump @@ -900,57 +900,6 @@ ## end gnulib module stdalign -## begin gnulib module stdarg - -BUILT_SOURCES += $(STDARG_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -if GL_GENERATE_STDARG_H -stdarg.h: stdarg.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|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_STDARG_H''@|$(NEXT_STDARG_H)|g' \ - < $(srcdir)/stdarg.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -stdarg.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stdarg.h stdarg.h-t - -EXTRA_DIST += stdarg.in.h - -## end gnulib module stdarg - -## begin gnulib module stdbool - -BUILT_SOURCES += $(STDBOOL_H) - -# We need the following in order to create when the system -# doesn't have one that works. -if GL_GENERATE_STDBOOL_H -stdbool.h: stdbool.in.h $(top_builddir)/config.status - $(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 $@ -else -stdbool.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stdbool.h stdbool.h-t - -EXTRA_DIST += stdbool.in.h - -## end gnulib module stdbool - ## begin gnulib module stddef BUILT_SOURCES += $(STDDEF_H) === removed file 'lib/stdarg.in.h' --- lib/stdarg.in.h 2014-01-01 07:43:34 +0000 +++ lib/stdarg.in.h 1970-01-01 00:00:00 +0000 @@ -1,35 +0,0 @@ -/* Substitute for and wrapper around . - Copyright (C) 2008-2014 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, see . */ - -#ifndef _@GUARD_PREFIX@_STDARG_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STDARG_H@ - -#ifndef _@GUARD_PREFIX@_STDARG_H -#define _@GUARD_PREFIX@_STDARG_H - -#ifndef va_copy -# define va_copy(a,b) ((a) = (b)) -#endif - -#endif /* _@GUARD_PREFIX@_STDARG_H */ -#endif /* _@GUARD_PREFIX@_STDARG_H */ === removed file 'lib/stdbool.in.h' --- lib/stdbool.in.h 2014-01-01 07:43:34 +0000 +++ lib/stdbool.in.h 1970-01-01 00:00:00 +0000 @@ -1,132 +0,0 @@ -/* Copyright (C) 2001-2003, 2006-2014 Free Software Foundation, Inc. - Written by Bruno Haible , 2001. - - 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, see . */ - -#ifndef _GL_STDBOOL_H -#define _GL_STDBOOL_H - -/* ISO C 99 for platforms that lack it. */ - -/* Usage suggestions: - - Programs that use should be aware of some limitations - and standards compliance issues. - - Standards compliance: - - - must be #included before 'bool', 'false', 'true' - can be used. - - - You cannot assume that sizeof (bool) == 1. - - - Programs should not undefine the macros bool, true, and false, - as C99 lists that as an "obsolescent feature". - - Limitations of this substitute, when used in a C89 environment: - - - must be #included before the '_Bool' type can be used. - - - You cannot assume that _Bool is a typedef; it might be a macro. - - - Bit-fields of type 'bool' are not supported. Portable code - should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. - - - In C99, casts and automatic conversions to '_Bool' or 'bool' are - performed in such a way that every nonzero value gets converted - to 'true', and zero gets converted to 'false'. This doesn't work - with this substitute. With this substitute, only the values 0 and 1 - give the expected result when converted to _Bool' or 'bool'. - - - C99 allows the use of (_Bool)0.0 in constant expressions, but - this substitute cannot always provide this property. - - Also, it is suggested that programs use 'bool' rather than '_Bool'; - this isn't required, but 'bool' is more common. */ - - -/* 7.16. Boolean type and values */ - -/* BeOS already #defines false 0, true 1. We use the same - definitions below, but temporarily we have to #undef them. */ -#if defined __BEOS__ && !defined __HAIKU__ -# include /* defines bool but not _Bool */ -# undef false -# undef true -#endif - -#ifdef __cplusplus -# define _Bool bool -# define bool bool -#else -# if defined __BEOS__ && !defined __HAIKU__ - /* A compiler known to have 'bool'. */ - /* If the compiler already has both 'bool' and '_Bool', we can assume they - are the same types. */ -# if !@HAVE__BOOL@ -typedef bool _Bool; -# endif -# else -# if !defined __GNUC__ - /* If @HAVE__BOOL@: - Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when - the built-in _Bool type is used. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - Similar bugs are likely with other compilers as well; this file - wouldn't be used if was working. - So we override the _Bool type. - If !@HAVE__BOOL@: - Need to define _Bool ourselves. As 'signed char' or as an enum type? - Use of a typedef, with SunPRO C, leads to a stupid - "warning: _Bool is a keyword in ISO C99". - Use of an enum type, with IRIX cc, leads to a stupid - "warning(1185): enumerated type mixed with another type". - Even the existence of an enum type, without a typedef, - "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. - The only benefit of the enum, debuggability, is not important - with these compilers. So use 'signed char' and no enum. */ -# define _Bool signed char -# else - /* With this compiler, trust the _Bool type if the compiler has it. */ -# if !@HAVE__BOOL@ - /* For the sake of symbolic names in gdb, define true and false as - enum constants, not only as macros. - It is tempting to write - typedef enum { false = 0, true = 1 } _Bool; - so that gdb prints values of type 'bool' symbolically. But then - values of type '_Bool' might promote to 'int' or 'unsigned int' - (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' - (see ISO C 99 6.3.1.1.(2)). So add a negative value to the - enum; this ensures that '_Bool' promotes to 'int'. */ -typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; -# endif -# endif -# endif -# define bool _Bool -#endif - -/* The other macros must be usable in preprocessor directives. */ -#ifdef __cplusplus -# define false false -# define true true -#else -# define false 0 -# define true 1 -#endif - -#define __bool_true_false_are_defined 1 - -#endif /* _GL_STDBOOL_H */ === modified file 'm4/gnulib-comp.m4' --- m4/gnulib-comp.m4 2014-03-07 18:57:11 +0000 +++ m4/gnulib-comp.m4 2014-05-17 08:11:31 +0000 @@ -119,13 +119,6 @@ # Code from module stat: # Code from module stat-time: # Code from module stdalign: - # Code from module stdarg: - dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode - dnl for the builtin va_copy to work. With Autoconf 2.60 or later, - dnl gl_PROG_CC_C99 arranges for this. With older Autoconf gl_PROG_CC_C99 - dnl shouldn't hurt, though installers are on their own to set c99 mode. - gl_PROG_CC_C99 - # Code from module stdbool: # Code from module stddef: # Code from module stdint: # Code from module stdio: @@ -342,8 +335,6 @@ gl_STAT_TIME gl_STAT_BIRTHTIME gl_STDALIGN_H - gl_STDARG_H - AM_STDBOOL_H gl_STDDEF_H gl_STDINT_H gl_STDIO_H @@ -891,8 +882,6 @@ lib/stat-time.h lib/stat.c lib/stdalign.in.h - lib/stdarg.in.h - lib/stdbool.in.h lib/stddef.in.h lib/stdint.in.h lib/stdio.in.h @@ -998,8 +987,6 @@ m4/stat-time.m4 m4/stat.m4 m4/stdalign.m4 - m4/stdarg.m4 - m4/stdbool.m4 m4/stddef_h.m4 m4/stdint.m4 m4/stdio_h.m4 === removed file 'm4/stdarg.m4' --- m4/stdarg.m4 2014-01-01 07:43:34 +0000 +++ m4/stdarg.m4 1970-01-01 00:00:00 +0000 @@ -1,78 +0,0 @@ -# stdarg.m4 serial 6 -dnl Copyright (C) 2006, 2008-2014 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 Bruno Haible. -dnl Provide a working va_copy in combination with . - -AC_DEFUN([gl_STDARG_H], -[ - STDARG_H='' - NEXT_STDARG_H='' - AC_MSG_CHECKING([for va_copy]) - AC_CACHE_VAL([gl_cv_func_va_copy], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[ -#ifndef va_copy -void (*func) (va_list, va_list) = va_copy; -#endif - ]])], - [gl_cv_func_va_copy=yes], - [gl_cv_func_va_copy=no])]) - AC_MSG_RESULT([$gl_cv_func_va_copy]) - if test $gl_cv_func_va_copy = no; then - dnl Provide a substitute. - dnl Usually a simple definition in is enough. Not so on AIX 5 - dnl with some versions of the /usr/vac/bin/cc compiler. It has an - dnl which does '#undef va_copy', leading to a missing va_copy symbol. For - dnl this platform, we use an substitute. But we cannot use this - dnl approach on other platforms, because often defines only - dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do - dnl not work in this situation. - AC_EGREP_CPP([vaccine], - [#if defined _AIX && !defined __GNUC__ - AIX vaccine - #endif - ], [gl_aixcc=yes], [gl_aixcc=no]) - if test $gl_aixcc = yes; then - dnl Provide a substitute file. - STDARG_H=stdarg.h - gl_NEXT_HEADERS([stdarg.h]) - dnl Fallback for the case when contains only macro definitions. - if test "$gl_cv_next_stdarg_h" = '""'; then - gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' - NEXT_STDARG_H="$gl_cv_next_stdarg_h" - fi - else - dnl Provide a substitute in , either __va_copy or as a simple - dnl assignment. - gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[ -#ifndef __va_copy -error, bail out -#endif - ]])], - [gl_cv_func___va_copy=yes], - [gl_cv_func___va_copy=no])]) - if test $gl_cv_func___va_copy = yes; then - AC_DEFINE([va_copy], [__va_copy], - [Define as a macro for copying va_list variables.]) - else - AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b))]) - AC_DEFINE([va_copy], [gl_va_copy], - [Define as a macro for copying va_list variables.]) - fi - fi - fi - AC_SUBST([STDARG_H]) - AM_CONDITIONAL([GL_GENERATE_STDARG_H], [test -n "$STDARG_H"]) - AC_SUBST([NEXT_STDARG_H]) -]) === removed file 'm4/stdbool.m4' --- m4/stdbool.m4 2014-01-01 07:43:34 +0000 +++ m4/stdbool.m4 1970-01-01 00:00:00 +0000 @@ -1,100 +0,0 @@ -# Check for stdbool.h that conforms to C99. - -dnl Copyright (C) 2002-2006, 2009-2014 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. - -#serial 5 - -# Prepare for substituting if it is not supported. - -AC_DEFUN([AM_STDBOOL_H], -[ - AC_REQUIRE([AC_CHECK_HEADER_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 - AC_SUBST([STDBOOL_H]) - AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"]) - - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi - AC_SUBST([HAVE__BOOL]) -]) - -# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. -AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) - -# This version of the macro is needed in autoconf <= 2.68. - -AC_DEFUN([AC_CHECK_HEADER_STDBOOL], - [AC_CACHE_CHECK([for stdbool.h that conforms to C99], - [ac_cv_header_stdbool_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ - #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; - ]], - [[ - 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); - ]])], - [ac_cv_header_stdbool_h=yes], - [ac_cv_header_stdbool_h=no])]) - AC_CHECK_TYPES([_Bool]) -]) === modified file 'nt/ChangeLog' --- nt/ChangeLog 2014-05-16 15:49:13 +0000 +++ nt/ChangeLog 2014-05-17 08:11:31 +0000 @@ -1,3 +1,8 @@ +2014-05-17 Paul Eggert + + Assume C99 or later (Bug#17487). + * gnulib.mk: Remove stdarg and stdbool modules. + 2014-05-16 Paul Eggert Don't require pkg-config when building from repository. === modified file 'nt/gnulib.mk' --- nt/gnulib.mk 2014-01-01 07:43:34 +0000 +++ nt/gnulib.mk 2014-05-17 08:11:31 +0000 @@ -671,57 +671,6 @@ ## end gnulib module stdalign -## begin gnulib module stdarg - -BUILT_SOURCES += $(STDARG_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -if GL_GENERATE_STDARG_H -stdarg.h: stdarg.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|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_STDARG_H''@|$(NEXT_STDARG_H)|g' \ - < $(srcdir)/stdarg.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -stdarg.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stdarg.h stdarg.h-t - -EXTRA_DIST += stdarg.in.h - -## end gnulib module stdarg - -## begin gnulib module stdbool - -BUILT_SOURCES += $(STDBOOL_H) - -# We need the following in order to create when the system -# doesn't have one that works. -if GL_GENERATE_STDBOOL_H -stdbool.h: stdbool.in.h $(top_builddir)/config.status - $(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 $@ -else -stdbool.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stdbool.h stdbool.h-t - -EXTRA_DIST += stdbool.in.h - -## end gnulib module stdbool - ## begin gnulib module stddef BUILT_SOURCES += $(STDDEF_H) === modified file 'src/ChangeLog' --- src/ChangeLog 2014-05-17 07:14:59 +0000 +++ src/ChangeLog 2014-05-17 08:11:31 +0000 @@ -1,3 +1,13 @@ +2014-05-17 Paul Eggert + + Assume C99 or later (Bug#17487). + * bytecode.c (B__dummy__): Remove. + * conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool. + (FLEXIBLE_ARRAY_MEMBER): Now always empty. + * dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]: + * regex.c (DEBUG_PRINT): Assume varargs macros. + * lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99. + 2014-05-17 Fabrice Popineau * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new === modified file 'src/bytecode.c' --- src/bytecode.c 2014-04-13 02:51:11 +0000 +++ src/bytecode.c 2014-05-17 08:11:31 +0000 @@ -292,8 +292,6 @@ Bscan_buffer = 0153, /* No longer generated as of v18. */ Bset_mark = 0163, /* this loser is no longer generated as of v18 */ #endif - - B__dummy__ = 0 /* Pacify C89. */ }; /* Whether to maintain a `top' and `bottom' field in the stack frame. */ === modified file 'src/conf_post.h' --- src/conf_post.h 2014-04-23 18:23:28 +0000 +++ src/conf_post.h 2014-05-17 08:11:31 +0000 @@ -34,9 +34,10 @@ #include -/* The pre-C99 emulation doesn't work for bool bitfields. - Nor does compiling Objective-C with standard GCC. */ -#if __STDC_VERSION__ < 199901 || NS_IMPL_GNUSTEP +/* The type of bool bitfields. Needed to compile Objective-C with + standard GCC. It was also needed to port to pre-C99 compilers, + although we don't care about that any more. */ +#if NS_IMPL_GNUSTEP typedef unsigned int bool_bf; #else typedef bool bool_bf; @@ -293,14 +294,11 @@ /* To use the struct hack with N elements, declare the struct like this: struct s { ...; t name[FLEXIBLE_ARRAY_MEMBER]; }; - and allocate (offsetof (struct s, name) + N * sizeof (t)) bytes. */ -#if 199901 <= __STDC_VERSION__ -# define FLEXIBLE_ARRAY_MEMBER -#elif __GNUC__ && !defined __STRICT_ANSI__ -# define FLEXIBLE_ARRAY_MEMBER 0 -#else -# define FLEXIBLE_ARRAY_MEMBER 1 -#endif + and allocate (offsetof (struct s, name) + N * sizeof (t)) bytes. + + This macro used to expand to something different on pre-C99 compilers. + FIXME: Remove it, and remove all uses. */ +#define FLEXIBLE_ARRAY_MEMBER /* Use this to suppress gcc's `...may be used before initialized' warnings. */ #ifdef lint === modified file 'src/dbusbind.c' --- src/dbusbind.c 2014-02-27 15:36:14 +0000 +++ src/dbusbind.c 2014-05-17 08:11:31 +0000 @@ -142,10 +142,7 @@ } while (0) #else /* !DBUS_DEBUG */ -# if __STDC_VERSION__ < 199901 -# define XD_DEBUG_MESSAGE (void) /* Pre-C99 compilers cannot debug. */ -# else -# define XD_DEBUG_MESSAGE(...) \ +# define XD_DEBUG_MESSAGE(...) \ do { \ if (!NILP (Vdbus_debug)) \ { \ @@ -154,7 +151,6 @@ message ("%s: %s", __func__, s); \ } \ } while (0) -# endif # define XD_DEBUG_VALID_LISP_OBJECT_P(object) #endif === modified file 'src/emacs.c' --- src/emacs.c 2014-04-18 23:36:51 +0000 +++ src/emacs.c 2014-05-17 08:11:31 +0000 @@ -214,7 +214,7 @@ static void sort_args (int argc, char **argv); static void syms_of_emacs (void); -/* C89 needs each string be at most 509 characters, so the usage +/* C99 needs each string to be at most 4095 characters, and the usage strings below are split to not overflow this limit. */ static char const *const usage_message[] = { "\ === modified file 'src/lisp.h' --- src/lisp.h 2014-04-28 16:59:41 +0000 +++ src/lisp.h 2014-05-17 08:11:31 +0000 @@ -2654,16 +2654,11 @@ minargs, maxargs, lname, intspec, 0}; \ Lisp_Object fnname #else /* not _MSC_VER */ -# if __STDC_VERSION__ < 199901 -# define DEFUN_FUNCTION_INIT(fnname, maxargs) (Lisp_Object (*) (void)) fnname -# else -# define DEFUN_FUNCTION_INIT(fnname, maxargs) .a ## maxargs = fnname -# endif #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ static struct Lisp_Subr alignas (GCALIGNMENT) sname = \ { { PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \ - { DEFUN_FUNCTION_INIT (fnname, maxargs) }, \ + { .a ## maxargs = fnname }, \ minargs, maxargs, lname, intspec, 0}; \ Lisp_Object fnname #endif === modified file 'src/regex.c' --- src/regex.c 2014-04-28 01:29:44 +0000 +++ src/regex.c 2014-05-17 08:11:31 +0000 @@ -1190,12 +1190,7 @@ # define assert(e) # define DEBUG_STATEMENT(e) -# if __STDC_VERSION__ < 199901L -# define DEBUG_COMPILES_ARGUMENTS -# define DEBUG_PRINT /* 'DEBUG_PRINT (x, y)' discards X and Y. */ (void) -# else -# define DEBUG_PRINT(...) -# endif +# define DEBUG_PRINT(...) # define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) # define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) ------------------------------------------------------------ revno: 117118 author: Fabrice Popineau committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2014-05-17 10:14:59 +0300 message: Always map new memory for buffers after dumping. src/buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new memory for every buffer that was dumped. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-05-15 14:59:02 +0000 +++ src/ChangeLog 2014-05-17 07:14:59 +0000 @@ -1,3 +1,8 @@ +2014-05-17 Fabrice Popineau + + * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new + memory for every buffer that was dumped. + 2014-05-15 Dmitry Antipov * fns.c (Freverse): Allow vectors, bool vectors and strings. === modified file 'src/buffer.c' --- src/buffer.c 2014-05-04 19:37:56 +0000 +++ src/buffer.c 2014-05-17 07:14:59 +0000 @@ -5336,16 +5336,17 @@ ptrdiff_t len; #ifdef USE_MMAP_FOR_BUFFERS - { - /* When using the ralloc implementation based on mmap(2), buffer - text pointers will have been set to null in the dumped Emacs. - Map new memory. */ - struct buffer *b; + { + struct buffer *b; - FOR_EACH_BUFFER (b) - if (b->text->beg == NULL) - enlarge_buffer_text (b, 0); - } + /* We cannot dump buffers with meaningful addresses that can be + used by the dumped Emacs. We map new memory for them here. */ + FOR_EACH_BUFFER (b) + { + b->text->beg = NULL; + enlarge_buffer_text (b, 0); + } + } #endif /* USE_MMAP_FOR_BUFFERS */ Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); ------------------------------------------------------------ revno: 117117 committer: Paul Eggert branch nick: trunk timestamp: Fri 2014-05-16 12:03:07 -0700 message: * configure.ac (EMACS_CHECK_MODULES): Fix typo and simplify. diff: === modified file 'configure.ac' --- configure.ac 2014-05-16 15:49:13 +0000 +++ configure.ac 2014-05-16 19:03:07 +0000 @@ -1375,13 +1375,8 @@ AC_DEFUN([EMACS_CHECK_MODULES], [PKG_CHECK_MODULES([$1], [$2], [$1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"` - emacs_check_module_ok=:], - [:]) - if $emacs_check_module_ok; then - m4_default([$3], [HAVE_$1=yes]) - else - m4_default([$4], [HAVE_$1=no]) - fi]) + m4_default([$3], [HAVE_$1=yes])], + [m4_default([$4], [HAVE_$1=no])])]) HAVE_SOUND=no if test "${with_sound}" != "no"; then ------------------------------------------------------------ revno: 117116 committer: Paul Eggert branch nick: trunk timestamp: Fri 2014-05-16 08:49:13 -0700 message: Don't require pkg-config when building from repository. * INSTALL: Prefer './configure FOO=BAR' to 'FOO=BAR ./configure'. * INSTALL.REPO: pkg-config is no longer required to build from the repository. * autogen.sh: Don't check for pkg-config. (progs): Remove pkg-config. (pkg_config_min, AUTORECONF_ENV, env_space, ACLOCAL_PATH): Remove. All uses removed. * m4/pkg.m4: New file, built by admin/merge-pkg-config. * configure.ac: Remove unnecessary m4_pattern_forbid of ^PKG_ and an AC_ARG_VAR of PKG_CONFIG_PATH. pkg.m4 does that for us. (EMACS_CHECK_MODULES): Remove workaround for old pkg-config bug, as we use pkg.m4 from a newer pkg-config. * admin/merge-pkg-config: New script. * admin/notes/copyright: Update for m4/*.m4, in particular m4/pkg.m4. * etc/NEWS: Prefer './configure FOO=BAR' to 'FOO=BAR ./configure'. * etc/PROBLEMS (Build-time-problems): Remove pkg-config problem that is no longer an issue. * nt/INSTALL: Remove no-longer-needed notes about pkg-config. diff: === modified file 'ChangeLog' --- ChangeLog 2014-05-15 16:55:18 +0000 +++ ChangeLog 2014-05-16 15:49:13 +0000 @@ -1,3 +1,19 @@ +2014-05-16 Paul Eggert + + Don't require pkg-config when building from repository. + * INSTALL: Prefer './configure FOO=BAR' to 'FOO=BAR ./configure'. + * INSTALL.REPO: pkg-config is no longer required to build from + the repository. + * autogen.sh: Don't check for pkg-config. + (progs): Remove pkg-config. + (pkg_config_min, AUTORECONF_ENV, env_space, ACLOCAL_PATH): + Remove. All uses removed. + * m4/pkg.m4: New file, built by admin/merge-pkg-config. + * configure.ac: Remove unnecessary m4_pattern_forbid of ^PKG_ and + an AC_ARG_VAR of PKG_CONFIG_PATH. pkg.m4 does that for us. + (EMACS_CHECK_MODULES): Remove workaround for old pkg-config bug, + as we use pkg.m4 from a newer pkg-config. + 2014-05-15 Jan Djärv * configure.ac (LIBPNG): Do not test for libpng if NS_IMPL_COCOA. === modified file 'INSTALL' --- INSTALL 2014-05-13 11:12:05 +0000 +++ INSTALL 2014-05-16 15:49:13 +0000 @@ -262,9 +262,9 @@ Gtk or Motif, if you have the Xaw3d library installed (see "Image support libraries" above for Xaw3d availability). -You can tell configure where to search for GTK by specifying -`--with-pkg-config-prog=PATH' where PATH is the pathname to -pkg-config. Note that GTK version 2.6 or newer is required for Emacs. +You can tell configure where to search for GTK by giving it the +argument PKG_CONFIG='/full/name/of/pkg-config'. GTK version 2.6 or +newer is required for Emacs. Emacs will autolaunch a D-Bus session bus, when the environment variable DISPLAY is set, but no session bus is running. This might be @@ -408,10 +408,11 @@ Here's an example of a `configure' invocation, assuming a Bourne-like shell such as Bash, which uses these variables: - CPPFLAGS='-I/foo/myinclude' LDFLAGS='-L/bar/mylib' \ - CFLAGS='-O3' LIBS='-lfoo -lbar' ./configure + ./configure \ + CPPFLAGS='-I/foo/myinclude' LDFLAGS='-L/bar/mylib' \ + CFLAGS='-O3' LIBS='-lfoo -lbar' -(this is all one long line). This tells `configure' to instruct the +(this is all one shell command). This tells `configure' to instruct the preprocessor to look in the `/foo/myinclude' directory for header files (in addition to the standard directories), instruct the linker to look in `/bar/mylib' for libraries, pass the -O3 optimization @@ -421,12 +422,11 @@ For some libraries, like Gtk+, fontconfig and ALSA, `configure' uses pkg-config to find where those libraries are installed. If you want pkg-config to look in special directories, you have to set -the environment variable PKG_CONFIG_PATH to point to the directories -where the .pc-files for those libraries are. -For example: +PKG_CONFIG_PATH to point to the directories where the .pc-files for +those libraries are. For example: - PKG_CONFIG_PATH='/usr/local/alsa/lib/pkgconfig:/opt/gtk+-2.8/lib/pkgconfig' \ - ./configure + ./configure \ + PKG_CONFIG_PATH='/usr/local/alsa/lib/pkgconfig:/opt/gtk+-2.8/lib/pkgconfig' The work of `configure' can be done by editing various files in the distribution, but using `configure' is easier. See the section called === modified file 'INSTALL.REPO' --- INSTALL.REPO 2014-05-02 23:18:11 +0000 +++ INSTALL.REPO 2014-05-16 15:49:13 +0000 @@ -12,8 +12,6 @@ configure.ac (in the AC_PREREQ command). automake - at least the version specified near the start of configure.ac (in the AM_INIT_AUTOMAKE command). -pkg-config - at least version specified in the PKG_PROG_PKG_CONFIG - command in configure.ac makeinfo - not strictly necessary, but highly recommended, so that you can build the manuals. === modified file 'admin/ChangeLog' --- admin/ChangeLog 2014-05-13 23:15:01 +0000 +++ admin/ChangeLog 2014-05-16 15:49:13 +0000 @@ -1,3 +1,9 @@ +2014-05-16 Paul Eggert + + Don't require pkg-config when building from repository. + * merge-pkg-config: New script. + * notes/copyright: Update for m4/*.m4, in particular m4/pkg.m4. + 2014-05-13 Paul Eggert * merge-gnulib: Defer to autogen.sh for ACLOCAL_PATH computation. === added file 'admin/merge-pkg-config' --- admin/merge-pkg-config 1970-01-01 00:00:00 +0000 +++ admin/merge-pkg-config 2014-05-16 15:49:13 +0000 @@ -0,0 +1,63 @@ +#! /bin/sh +# Merge pkg-config macros into Emacs sources. +# Typical usage: +# +# admin/merge-pkg-config + +# Copyright 2014 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 . + +# written by Paul Eggert + +{ + # Maybe ACLOCAL_PATH is already set-up. + oIFS=$IFS + IFS=: + for dir in $ACLOCAL_PATH ''; do + test -n "$dir" && test -r "$dir/pkg.m4" && break + done + IFS=$oIFS + + test -n "$dir" +} || { + # Use the pkg.m4 installed where aclocal knows about it. + # Maybe we are running our own aclocal, which doesn't know where + # the standard pkg.m4 is installed, so try running all the + # aclocal programs in our PATH. + oIFS=$IFS + IFS=: + for dir in $PATH ''; do + if test -n "$dir" && test -x "$dir/aclocal"; then + dir=$("$dir/aclocal" --print-ac-dir) && test -r "$dir/pkg.m4" && break + fi + done + IFS=$oIFS + + test -n "$dir" +} || { + echo >&2 "$0: cannot find pkg.m4" + exit 1 +} + +test -d m4 || { + echo >&2 "$0: please run this command in the main source directory" + exit 1 +} + +echo >&2 "$0: copying $dir/pkg.m4 to m4/pkg.m4" + +cp $dir/pkg.m4 m4 === modified file 'admin/notes/copyright' --- admin/notes/copyright 2014-03-22 23:47:20 +0000 +++ admin/notes/copyright 2014-05-16 15:49:13 +0000 @@ -137,7 +137,10 @@ aclocal.m4 configure m4/*.m4 - - copyright FSF, with unlimited permission to copy, distribute and modify + - These files are copyright FSF, with unlimited permission to copy, + distribute and modify, so long as the copyright notice is preserved. + Exception: m4/pkg.m4 is copyright Scott James Remnant; it is + distributed under the same terms as for the rest of Emacs. lib/Makefile.in - copyright FSF, with MIT-like license === modified file 'autogen.sh' --- autogen.sh 2014-05-11 02:52:00 +0000 +++ autogen.sh 2014-05-16 15:49:13 +0000 @@ -32,7 +32,7 @@ ## Tools we need: ## Note that we respect the values of AUTOCONF etc, like autoreconf does. -progs="autoconf automake pkg-config" +progs="autoconf automake" ## Minimum versions we need: autoconf_min=`sed -n 's/^ *AC_PREREQ(\([0-9\.]*\)).*/\1/p' configure.ac` @@ -41,7 +41,6 @@ ## AM_INIT_AUTOMAKE call. automake_min=`sed -n 's/^ *AM_INIT_AUTOMAKE(\([0-9\.]*\)).*/\1/p' configure.ac` -pkg_config_min=`sed -n 's/^ *PKG_PROG_PKG_CONFIG(\([0-9\.]*\)).*/\1/p' configure.ac` ## $1 = program, eg "autoconf". ## Echo the version string, eg "2.59". @@ -205,97 +204,8 @@ exit 1 fi -# If automake is installed in a nonstandard location, find the standard -# location if possible and append it to ACLOCAL_PATH. That way, it will -# find the pkg.m4 that is installed in the standard location. -echo "Checking for pkg.m4..." -AUTORECONF_ENV= -env_space= -ac_dir=`aclocal --print-ac-dir` || { - cat < src/stamp-h.in || exit -echo "You can now run \"./configure$env_space$AUTORECONF_ENV\"." +echo "You can now run './configure'." exit 0 === modified file 'configure.ac' --- configure.ac 2014-05-15 16:54:44 +0000 +++ configure.ac 2014-05-16 15:49:13 +0000 @@ -296,7 +296,7 @@ dnl http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01844.html OPTION_DEFAULT_ON([makeinfo],[don't require makeinfo for building manuals]) -## This might be a 'configure' arg, e.g., autogen.sh might set it. +## This might be a 'configure' arg. AC_SUBST([ACLOCAL_PATH]) ## Makefile.in needs the cache file name. @@ -1359,10 +1359,6 @@ AC_DEFINE_UNQUOTED(SYSTEM_TYPE, "$SYSTEM_TYPE", [The type of system you are compiling for; sets `system-type'.]) -m4_pattern_forbid([^PKG_]) - -AC_ARG_VAR(PKG_CONFIG_PATH, [Colon-separated list of directories -searched by pkg-config]) pre_PKG_CONFIG_CFLAGS=$CFLAGS pre_PKG_CONFIG_LIBS=$LIBS @@ -1372,24 +1368,15 @@ dnl EMACS_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4) dnl acts like PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, dnl HAVE_GSTUFF=yes, HAVE_GSTUFF=no) -- see pkg-config man page -- -dnl except that it works around older pkg-config bugs and -dnl it postprocesses CFLAGS as needed for --enable-gcc-warnings. +dnl except that it postprocesses CFLAGS as needed for --enable-gcc-warnings. dnl EMACS_CHECK_MODULES accepts optional 3rd and 4th arguments that dnl can take the place of the default HAVE_GSTUFF=yes and HAVE_GSTUFF=no dnl actions. AC_DEFUN([EMACS_CHECK_MODULES], - [dnl pkg-config before 0.26 doesn't check exit status properly; see: - dnl https://bugs.freedesktop.org/show_bug.cgi?id=29801 - dnl Work around the bug by checking the status ourselves. - emacs_check_module_ok=false - AS_IF([test -n "$PKG_CONFIG" && - { $PKG_CONFIG --atleast-pkgconfig-version 0.26 || - { $PKG_CONFIG --cflags "$2" && $PKG_CONFIG --libs "$2"; } - } >/dev/null 2>&AS_MESSAGE_LOG_FD], - [PKG_CHECK_MODULES([$1], [$2], - [$1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"` - emacs_check_module_ok=:], - [:])]) + [PKG_CHECK_MODULES([$1], [$2], + [$1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"` + emacs_check_module_ok=:], + [:]) if $emacs_check_module_ok; then m4_default([$3], [HAVE_$1=yes]) else === modified file 'etc/ChangeLog' --- etc/ChangeLog 2014-05-13 11:12:05 +0000 +++ etc/ChangeLog 2014-05-16 15:49:13 +0000 @@ -1,3 +1,10 @@ +2014-05-16 Paul Eggert + + Don't require pkg-config when building from repository. + * NEWS: Prefer './configure FOO=BAR' to 'FOO=BAR ./configure'. + * PROBLEMS (Build-time-problems): Remove pkg-config problem + that is no longer an issue. + 2014-05-13 Dmitry Antipov * PROBLEMS: Mention potential problems with === modified file 'etc/NEWS' --- etc/NEWS 2014-05-14 17:15:15 +0000 +++ etc/NEWS 2014-05-16 15:49:13 +0000 @@ -36,7 +36,7 @@ --- ** The configure option `--with-pkg-config-prog' has been removed. -Use the PKG_CONFIG environment variable instead if you need to. +Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to. * Startup Changes in Emacs 24.5 === modified file 'etc/PROBLEMS' --- etc/PROBLEMS 2014-05-13 11:12:05 +0000 +++ etc/PROBLEMS 2014-05-16 15:49:13 +0000 @@ -2237,17 +2237,6 @@ * Build-time problems -** Autoreconf - -*** autoreconf fails with "possibly undefined macro: PKG_CONFIG". -This can happen if you installed your own automake in a non-standard -location /prefix. The simplest workaround is to run ./autogen.sh -instead. If you prefer to run autoreconf directly, then if pkg.m4 is -in the directory /usr/share/aclocal you can append /usr/share/local to -your ACLOCAL_PATH environment variable, or you can add a line -"/usr/share/aclocal" to the file /prefix/share/aclocal/dirlist (create -the file if necessary). - ** Configuration *** `configure' warns ``accepted by the compiler, rejected by the preprocessor''. === added file 'm4/pkg.m4' --- m4/pkg.m4 1970-01-01 00:00:00 +0000 +++ m4/pkg.m4 2014-05-16 15:49:13 +0000 @@ -0,0 +1,214 @@ +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant . +# +# 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 2 of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT])[]dnl + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])[]dnl + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])# PKG_CHECK_MODULES + + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR === modified file 'nt/ChangeLog' --- nt/ChangeLog 2014-05-05 10:06:04 +0000 +++ nt/ChangeLog 2014-05-16 15:49:13 +0000 @@ -1,3 +1,8 @@ +2014-05-16 Paul Eggert + + Don't require pkg-config when building from repository. + * INSTALL: Remove no-longer-needed notes about pkg-config. + 2014-05-05 Eli Zaretskii * INSTALL: Update to the effect that pkg-config is now required === modified file 'nt/INSTALL' --- nt/INSTALL 2014-05-12 06:59:30 +0000 +++ nt/INSTALL 2014-05-16 15:49:13 +0000 @@ -115,11 +115,6 @@ MSYS Texinfo, after installing it as part of msys-base, invoke the command "mingw-get remove msys-texinfo".) - In addition, building Emacs from the development repository requires - pkg-config to be installed. As the MinGW project does not offer it, - you will have to install it from elsewhere; see below (search for - "pkg-config"). - At this point, you should be ready to configure and build Emacs in its basic configuration. Skip to the "Generating the configure script" section for the build instructions. If you want to build it @@ -179,9 +174,7 @@ Available from http://sourceforge.net/projects/ezwinports/files/. . pkg-config (invoked by the configure script to look for optional - packages; _required_ for building from the development - repository, as some components of pkg-config are needed to run - the autoconf and aclocal scripts) + packages) Available from http://www.gtk.org/download/win32.php @@ -243,10 +236,10 @@ from which you unpack all of the MSYS packages. After installing Automake and Autoconf, make sure any of the *.m4 - files you might have in your MinGW installation (e.g., pkg.m4 that - comes with pkg-config) also exist in the MSYS installation tree, in - the share/aclocal directory. Those *.m4 files which exist in the - MinGW tree, but not in the MSYS tree should be copied there. + files you might have in your MinGW installation also exist in the + MSYS installation tree, in the share/aclocal directory. Those *.m4 + files which exist in the MinGW tree, but not in the MSYS tree should + be copied there. If/when you are confident in your MinGW/MSYS installation, and want to speed up the builds, we recommend installing a pre-release @@ -311,10 +304,6 @@ ok Checking for automake (need at least version 1.11)... ok - Checking for pkg-config (need at least version 0.9.0)... - ok - Checking for pkg.m4... - ok Your system has the required tools, running autoreconf... You can now run `./configure'. ------------------------------------------------------------ revno: 117115 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-05-15 23:06:55 -0700 message: * etc/TODO: Add entry on printing. diff: === modified file 'etc/TODO' --- etc/TODO 2014-02-07 03:19:39 +0000 +++ etc/TODO 2014-05-16 06:06:55 +0000 @@ -309,6 +309,12 @@ * Other features we would like: +** A more modern printing interface. One that pops up a dialog that lets +you choose printer, page style, etc. +Integration with the Gtk print dialog is apparently difficult. See eg: +http://lists.gnu.org/archive/html/emacs-devel/2009-03/msg00501.html +http://lists.gnu.org/archive/html/emacs-devel/2009-04/msg00034.html + ** Allow frames(terminals) created by emacsclient to inherit their environment from the emacsclient process. ** Remove the default toggling behavior of minor modes when called from elisp