diff options
| author | Dan Nicolaescu | 2009-06-26 23:41:43 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2009-06-26 23:41:43 +0000 |
| commit | 297710942213ef3bf4a06190459bbc1fb0362ffb (patch) | |
| tree | fe2b790d3a7456a1756155bace7a1373ccd250be | |
| parent | 25c5550f48ae371dbbe4e7cd7048efcefa030670 (diff) | |
| download | emacs-297710942213ef3bf4a06190459bbc1fb0362ffb.tar.gz emacs-297710942213ef3bf4a06190459bbc1fb0362ffb.zip | |
(--enable-checking): New option.
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rwxr-xr-x | configure | 103 | ||||
| -rw-r--r-- | configure.in | 67 | ||||
| -rw-r--r-- | src/config.in | 23 |
4 files changed, 182 insertions, 15 deletions
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-06-26 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * configure.in (--enable-checking): New option. | ||
| 4 | |||
| 1 | 2009-06-24 Glenn Morris <rgm@gnu.org> | 5 | 2009-06-24 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * make-dist: Warn if subdir does not exist in source. | 7 | * make-dist: Warn if subdir does not exist in source. |
| @@ -1,6 +1,6 @@ | |||
| 1 | #! /bin/sh | 1 | #! /bin/sh |
| 2 | # Guess values for system-dependent variables and create Makefiles. | 2 | # Guess values for system-dependent variables and create Makefiles. |
| 3 | # Generated by GNU Autoconf 2.61 for emacs 23.0.95. | 3 | # Generated by GNU Autoconf 2.61 for emacs 23.1.50. |
| 4 | # | 4 | # |
| 5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | 5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
| 6 | # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 6 | # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| @@ -572,8 +572,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} | |||
| 572 | # Identity of this package. | 572 | # Identity of this package. |
| 573 | PACKAGE_NAME='emacs' | 573 | PACKAGE_NAME='emacs' |
| 574 | PACKAGE_TARNAME='emacs' | 574 | PACKAGE_TARNAME='emacs' |
| 575 | PACKAGE_VERSION='23.0.95' | 575 | PACKAGE_VERSION='23.1.50' |
| 576 | PACKAGE_STRING='emacs 23.0.95' | 576 | PACKAGE_STRING='emacs 23.1.50' |
| 577 | PACKAGE_BUGREPORT='' | 577 | PACKAGE_BUGREPORT='' |
| 578 | 578 | ||
| 579 | ac_unique_file="src/lisp.h" | 579 | ac_unique_file="src/lisp.h" |
| @@ -1256,7 +1256,7 @@ if test "$ac_init_help" = "long"; then | |||
| 1256 | # Omit some internal or obsolete options to make the list less imposing. | 1256 | # Omit some internal or obsolete options to make the list less imposing. |
| 1257 | # This message is too long to be a string in the A/UX 3.1 sh. | 1257 | # This message is too long to be a string in the A/UX 3.1 sh. |
| 1258 | cat <<_ACEOF | 1258 | cat <<_ACEOF |
| 1259 | \`configure' configures emacs 23.0.95 to adapt to many kinds of systems. | 1259 | \`configure' configures emacs 23.1.50 to adapt to many kinds of systems. |
| 1260 | 1260 | ||
| 1261 | Usage: $0 [OPTION]... [VAR=VALUE]... | 1261 | Usage: $0 [OPTION]... [VAR=VALUE]... |
| 1262 | 1262 | ||
| @@ -1330,7 +1330,7 @@ fi | |||
| 1330 | 1330 | ||
| 1331 | if test -n "$ac_init_help"; then | 1331 | if test -n "$ac_init_help"; then |
| 1332 | case $ac_init_help in | 1332 | case $ac_init_help in |
| 1333 | short | recursive ) echo "Configuration of emacs 23.0.95:";; | 1333 | short | recursive ) echo "Configuration of emacs 23.1.50:";; |
| 1334 | esac | 1334 | esac |
| 1335 | cat <<\_ACEOF | 1335 | cat <<\_ACEOF |
| 1336 | 1336 | ||
| @@ -1346,6 +1346,12 @@ Optional Features: | |||
| 1346 | --enable-locallisppath=PATH | 1346 | --enable-locallisppath=PATH |
| 1347 | directories Emacs should search for lisp files | 1347 | directories Emacs should search for lisp files |
| 1348 | specific to this site | 1348 | specific to this site |
| 1349 | --enable-checking=LIST | ||
| 1350 | enable expensive run-time checks. With LIST, | ||
| 1351 | enable only specific categories of checks. | ||
| 1352 | Categories are: all,yes,no. | ||
| 1353 | Flags are: stringbytes, stringoverrun, stringfreelist, | ||
| 1354 | xmallocoverrun, conslist | ||
| 1349 | --disable-largefile omit support for large files | 1355 | --disable-largefile omit support for large files |
| 1350 | 1356 | ||
| 1351 | Optional Packages: | 1357 | Optional Packages: |
| @@ -1459,7 +1465,7 @@ fi | |||
| 1459 | test -n "$ac_init_help" && exit $ac_status | 1465 | test -n "$ac_init_help" && exit $ac_status |
| 1460 | if $ac_init_version; then | 1466 | if $ac_init_version; then |
| 1461 | cat <<\_ACEOF | 1467 | cat <<\_ACEOF |
| 1462 | emacs configure 23.0.95 | 1468 | emacs configure 23.1.50 |
| 1463 | generated by GNU Autoconf 2.61 | 1469 | generated by GNU Autoconf 2.61 |
| 1464 | 1470 | ||
| 1465 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | 1471 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
| @@ -1473,7 +1479,7 @@ cat >config.log <<_ACEOF | |||
| 1473 | This file contains any messages produced by compilers while | 1479 | This file contains any messages produced by compilers while |
| 1474 | running configure, to aid debugging if configure makes a mistake. | 1480 | running configure, to aid debugging if configure makes a mistake. |
| 1475 | 1481 | ||
| 1476 | It was created by emacs $as_me 23.0.95, which was | 1482 | It was created by emacs $as_me 23.1.50, which was |
| 1477 | generated by GNU Autoconf 2.61. Invocation command line was | 1483 | generated by GNU Autoconf 2.61. Invocation command line was |
| 1478 | 1484 | ||
| 1479 | $ $0 $@ | 1485 | $ $0 $@ |
| @@ -2201,6 +2207,85 @@ fi | |||
| 2201 | fi | 2207 | fi |
| 2202 | 2208 | ||
| 2203 | 2209 | ||
| 2210 | # Check whether --enable-checking was given. | ||
| 2211 | if test "${enable_checking+set}" = set; then | ||
| 2212 | enableval=$enable_checking; ac_checking_flags="${enableval}" | ||
| 2213 | fi | ||
| 2214 | |||
| 2215 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | ||
| 2216 | for check in $ac_checking_flags | ||
| 2217 | do | ||
| 2218 | case $check in | ||
| 2219 | # these set all the flags to specific states | ||
| 2220 | yes) ac_enable_checking=1 ;; | ||
| 2221 | no) ac_enable_checking= ; | ||
| 2222 | ac_gc_check_stringbytes= ; | ||
| 2223 | ac_gc_check_string_overrun= ; | ||
| 2224 | ac_gc_check_string_free_list= ; | ||
| 2225 | ac_xmalloc_overrun= ; | ||
| 2226 | ac_gc_check_cons_list= ;; | ||
| 2227 | all) ac_enable_checking=1 ; | ||
| 2228 | ac_gc_check_stringbytes=1 ; | ||
| 2229 | ac_gc_check_string_overrun=1 ; | ||
| 2230 | ac_gc_check_string_free_list=1 ; | ||
| 2231 | ac_xmalloc_overrun=1 ; | ||
| 2232 | ac_gc_check_cons_list=1 ;; | ||
| 2233 | # these enable particular checks | ||
| 2234 | stringbytes) ac_gc_check_stringbytes=1 ;; | ||
| 2235 | stringoverrun) ac_gc_check_string_overrun=1 ;; | ||
| 2236 | stringfreelist) ac_gc_check_string_free_list=1 ;; | ||
| 2237 | xmallocoverrun) ac_xmalloc_overrun=1 ;; | ||
| 2238 | conslist) ac_gc_check_cons_list=1 ;; | ||
| 2239 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 | ||
| 2240 | echo "$as_me: error: unknown check category $check" >&2;} | ||
| 2241 | { (exit 1); exit 1; }; } ;; | ||
| 2242 | esac | ||
| 2243 | done | ||
| 2244 | IFS="$ac_save_IFS" | ||
| 2245 | |||
| 2246 | if test x$ac_enable_checking != x ; then | ||
| 2247 | |||
| 2248 | cat >>confdefs.h <<\_ACEOF | ||
| 2249 | #define ENABLE_CHECKING 1 | ||
| 2250 | _ACEOF | ||
| 2251 | |||
| 2252 | fi | ||
| 2253 | if test x$ac_gc_check_stringbytes != x ; then | ||
| 2254 | |||
| 2255 | cat >>confdefs.h <<\_ACEOF | ||
| 2256 | #define GC_CHECK_STRING_BYTES 1 | ||
| 2257 | _ACEOF | ||
| 2258 | |||
| 2259 | fi | ||
| 2260 | if test x$ac_gc_check_stringoverrun != x ; then | ||
| 2261 | |||
| 2262 | cat >>confdefs.h <<\_ACEOF | ||
| 2263 | #define GC_CHECK_STRING_OVERRUN 1 | ||
| 2264 | _ACEOF | ||
| 2265 | |||
| 2266 | fi | ||
| 2267 | if test x$ac_gc_check_string_free_list != x ; then | ||
| 2268 | |||
| 2269 | cat >>confdefs.h <<\_ACEOF | ||
| 2270 | #define GC_CHECK_STRING_FREE_LIST 1 | ||
| 2271 | _ACEOF | ||
| 2272 | |||
| 2273 | fi | ||
| 2274 | if test x$ac_xmalloc_overrun != x ; then | ||
| 2275 | |||
| 2276 | cat >>confdefs.h <<\_ACEOF | ||
| 2277 | #define XMALLOC_OVERRUN_CHECK 1 | ||
| 2278 | _ACEOF | ||
| 2279 | |||
| 2280 | fi | ||
| 2281 | if test x$ac_gc_check_cons_list != x ; then | ||
| 2282 | |||
| 2283 | cat >>confdefs.h <<\_ACEOF | ||
| 2284 | #define GC_CHECK_CONS_LIST 1 | ||
| 2285 | _ACEOF | ||
| 2286 | |||
| 2287 | fi | ||
| 2288 | |||
| 2204 | #### Make srcdir absolute, if it isn't already. It's important to | 2289 | #### Make srcdir absolute, if it isn't already. It's important to |
| 2205 | #### avoid running the path through pwd unnecessarily, since pwd can | 2290 | #### avoid running the path through pwd unnecessarily, since pwd can |
| 2206 | #### give you automounter prefixes, which can go away. We do all this | 2291 | #### give you automounter prefixes, which can go away. We do all this |
| @@ -24896,7 +24981,7 @@ exec 6>&1 | |||
| 24896 | # report actual input values of CONFIG_FILES etc. instead of their | 24981 | # report actual input values of CONFIG_FILES etc. instead of their |
| 24897 | # values after options handling. | 24982 | # values after options handling. |
| 24898 | ac_log=" | 24983 | ac_log=" |
| 24899 | This file was extended by emacs $as_me 23.0.95, which was | 24984 | This file was extended by emacs $as_me 23.1.50, which was |
| 24900 | generated by GNU Autoconf 2.61. Invocation command line was | 24985 | generated by GNU Autoconf 2.61. Invocation command line was |
| 24901 | 24986 | ||
| 24902 | CONFIG_FILES = $CONFIG_FILES | 24987 | CONFIG_FILES = $CONFIG_FILES |
| @@ -24949,7 +25034,7 @@ Report bugs to <bug-autoconf@gnu.org>." | |||
| 24949 | _ACEOF | 25034 | _ACEOF |
| 24950 | cat >>$CONFIG_STATUS <<_ACEOF | 25035 | cat >>$CONFIG_STATUS <<_ACEOF |
| 24951 | ac_cs_version="\\ | 25036 | ac_cs_version="\\ |
| 24952 | emacs config.status 23.0.95 | 25037 | emacs config.status 23.1.50 |
| 24953 | configured by $0, generated by GNU Autoconf 2.61, | 25038 | configured by $0, generated by GNU Autoconf 2.61, |
| 24954 | with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | 25039 | with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" |
| 24955 | 25040 | ||
diff --git a/configure.in b/configure.in index 654985d6f18..d61162d8238 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -209,6 +209,70 @@ elif test "${enableval}" != "yes"; then | |||
| 209 | locallisppath=${enableval} | 209 | locallisppath=${enableval} |
| 210 | fi) | 210 | fi) |
| 211 | 211 | ||
| 212 | AC_ARG_ENABLE(checking, | ||
| 213 | [ --enable-checking[=LIST] | ||
| 214 | enable expensive run-time checks. With LIST, | ||
| 215 | enable only specific categories of checks. | ||
| 216 | Categories are: all,yes,no. | ||
| 217 | Flags are: stringbytes, stringoverrun, stringfreelist, | ||
| 218 | xmallocoverrun, conslist], | ||
| 219 | [ac_checking_flags="${enableval}"],[]) | ||
| 220 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | ||
| 221 | for check in $ac_checking_flags | ||
| 222 | do | ||
| 223 | case $check in | ||
| 224 | # these set all the flags to specific states | ||
| 225 | yes) ac_enable_checking=1 ;; | ||
| 226 | no) ac_enable_checking= ; | ||
| 227 | ac_gc_check_stringbytes= ; | ||
| 228 | ac_gc_check_string_overrun= ; | ||
| 229 | ac_gc_check_string_free_list= ; | ||
| 230 | ac_xmalloc_overrun= ; | ||
| 231 | ac_gc_check_cons_list= ;; | ||
| 232 | all) ac_enable_checking=1 ; | ||
| 233 | ac_gc_check_stringbytes=1 ; | ||
| 234 | ac_gc_check_string_overrun=1 ; | ||
| 235 | ac_gc_check_string_free_list=1 ; | ||
| 236 | ac_xmalloc_overrun=1 ; | ||
| 237 | ac_gc_check_cons_list=1 ;; | ||
| 238 | # these enable particular checks | ||
| 239 | stringbytes) ac_gc_check_stringbytes=1 ;; | ||
| 240 | stringoverrun) ac_gc_check_string_overrun=1 ;; | ||
| 241 | stringfreelist) ac_gc_check_string_free_list=1 ;; | ||
| 242 | xmallocoverrun) ac_xmalloc_overrun=1 ;; | ||
| 243 | conslist) ac_gc_check_cons_list=1 ;; | ||
| 244 | *) AC_MSG_ERROR(unknown check category $check) ;; | ||
| 245 | esac | ||
| 246 | done | ||
| 247 | IFS="$ac_save_IFS" | ||
| 248 | |||
| 249 | if test x$ac_enable_checking != x ; then | ||
| 250 | AC_DEFINE(ENABLE_CHECKING, 1, | ||
| 251 | [Enable expensive run-time checking of data types?]) | ||
| 252 | fi | ||
| 253 | if test x$ac_gc_check_stringbytes != x ; then | ||
| 254 | AC_DEFINE(GC_CHECK_STRING_BYTES, 1, | ||
| 255 | [Define this temporarily to hunt a bug. If defined, the size of | ||
| 256 | strings is redundantly recorded in sdata structures so that it can | ||
| 257 | be compared to the sizes recorded in Lisp strings.]) | ||
| 258 | fi | ||
| 259 | if test x$ac_gc_check_stringoverrun != x ; then | ||
| 260 | AC_DEFINE(GC_CHECK_STRING_OVERRUN, 1, | ||
| 261 | [Define this to check for short string overrun.]) | ||
| 262 | fi | ||
| 263 | if test x$ac_gc_check_string_free_list != x ; then | ||
| 264 | AC_DEFINE(GC_CHECK_STRING_FREE_LIST, 1, | ||
| 265 | [Define this to check the string free list.]) | ||
| 266 | fi | ||
| 267 | if test x$ac_xmalloc_overrun != x ; then | ||
| 268 | AC_DEFINE(XMALLOC_OVERRUN_CHECK, 1, | ||
| 269 | [Define this to check for malloc buffer overrun.]) | ||
| 270 | fi | ||
| 271 | if test x$ac_gc_check_cons_list != x ; then | ||
| 272 | AC_DEFINE(GC_CHECK_CONS_LIST, 1, | ||
| 273 | [Define this to check for errors in cons list.]) | ||
| 274 | fi | ||
| 275 | |||
| 212 | #### Make srcdir absolute, if it isn't already. It's important to | 276 | #### Make srcdir absolute, if it isn't already. It's important to |
| 213 | #### avoid running the path through pwd unnecessarily, since pwd can | 277 | #### avoid running the path through pwd unnecessarily, since pwd can |
| 214 | #### give you automounter prefixes, which can go away. We do all this | 278 | #### give you automounter prefixes, which can go away. We do all this |
| @@ -2789,9 +2853,6 @@ typedef unsigned size_t; | |||
| 2789 | #define HAVE_X11R6_XIM | 2853 | #define HAVE_X11R6_XIM |
| 2790 | #endif | 2854 | #endif |
| 2791 | 2855 | ||
| 2792 | /* Should we enable expensive run-time checking of data types? */ | ||
| 2793 | #undef ENABLE_CHECKING | ||
| 2794 | |||
| 2795 | #if defined __GNUC__ && (__GNUC__ > 2 \ | 2856 | #if defined __GNUC__ && (__GNUC__ > 2 \ |
| 2796 | || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) | 2857 | || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) |
| 2797 | #define NO_RETURN __attribute__ ((__noreturn__)) | 2858 | #define NO_RETURN __attribute__ ((__noreturn__)) |
diff --git a/src/config.in b/src/config.in index ccc9689eb3f..404e00bd069 100644 --- a/src/config.in +++ b/src/config.in | |||
| @@ -59,6 +59,23 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 59 | /* Define to the options passed to configure. */ | 59 | /* Define to the options passed to configure. */ |
| 60 | #undef EMACS_CONFIG_OPTIONS | 60 | #undef EMACS_CONFIG_OPTIONS |
| 61 | 61 | ||
| 62 | /* Enable expensive run-time checking of data types? */ | ||
| 63 | #undef ENABLE_CHECKING | ||
| 64 | |||
| 65 | /* Define this to check for errors in cons list. */ | ||
| 66 | #undef GC_CHECK_CONS_LIST | ||
| 67 | |||
| 68 | /* Define this temporarily to hunt a bug. If defined, the size of strings is | ||
| 69 | redundantly recorded in sdata structures so that it can be compared to the | ||
| 70 | sizes recorded in Lisp strings. */ | ||
| 71 | #undef GC_CHECK_STRING_BYTES | ||
| 72 | |||
| 73 | /* Define this to check the string free list. */ | ||
| 74 | #undef GC_CHECK_STRING_FREE_LIST | ||
| 75 | |||
| 76 | /* Define this to check for short string overrun. */ | ||
| 77 | #undef GC_CHECK_STRING_OVERRUN | ||
| 78 | |||
| 62 | /* Define to 1 if the `getloadavg' function needs to be run setuid or setgid. | 79 | /* Define to 1 if the `getloadavg' function needs to be run setuid or setgid. |
| 63 | */ | 80 | */ |
| 64 | #undef GETLOADAVG_PRIVILEGED | 81 | #undef GETLOADAVG_PRIVILEGED |
| @@ -897,6 +914,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 897 | /* Define to 1 if using an X toolkit. */ | 914 | /* Define to 1 if using an X toolkit. */ |
| 898 | #undef USE_X_TOOLKIT | 915 | #undef USE_X_TOOLKIT |
| 899 | 916 | ||
| 917 | /* Define this to check for malloc buffer overrun. */ | ||
| 918 | #undef XMALLOC_OVERRUN_CHECK | ||
| 919 | |||
| 900 | /* Define to the type of the 6th arg of XRegisterIMInstantiateCallback, either | 920 | /* Define to the type of the 6th arg of XRegisterIMInstantiateCallback, either |
| 901 | XPointer or XPointer*. */ | 921 | XPointer or XPointer*. */ |
| 902 | #undef XRegisterIMInstantiateCallback_arg6 | 922 | #undef XRegisterIMInstantiateCallback_arg6 |
| @@ -1173,9 +1193,6 @@ typedef unsigned size_t; | |||
| 1173 | #define HAVE_X11R6_XIM | 1193 | #define HAVE_X11R6_XIM |
| 1174 | #endif | 1194 | #endif |
| 1175 | 1195 | ||
| 1176 | /* Should we enable expensive run-time checking of data types? */ | ||
| 1177 | #undef ENABLE_CHECKING | ||
| 1178 | |||
| 1179 | #if defined __GNUC__ && (__GNUC__ > 2 \ | 1196 | #if defined __GNUC__ && (__GNUC__ > 2 \ |
| 1180 | || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) | 1197 | || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) |
| 1181 | #define NO_RETURN __attribute__ ((__noreturn__)) | 1198 | #define NO_RETURN __attribute__ ((__noreturn__)) |