summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2010-07-02 01:11:24 -0700
committerDan Nicolaescu <dann@ics.uci.edu>2010-07-02 01:11:24 -0700
commitd9170db5208a86d94a6d8a89c8fa1e678bd094bd (patch)
treef15dc1b36d3807346f6f346b1c229e53a6a72ca4
parent986011195e5c40b9644c21da166c12cb34176350 (diff)
downloademacs-d9170db5208a86d94a6d8a89c8fa1e678bd094bd.tar.gz
emacs-d9170db5208a86d94a6d8a89c8fa1e678bd094bd.tar.bz2
emacs-d9170db5208a86d94a6d8a89c8fa1e678bd094bd.zip
Define USE_LISP_UNION_TYPE using autoconf.
* configure.in (--enable-use-lisp-union-type): New flag. * src/lisp.h: Document that USE_LISP_UNION_TYPE is now enabled using autoconf.
-rw-r--r--ChangeLog4
-rwxr-xr-xconfigure18
-rw-r--r--configure.in10
-rw-r--r--etc/NEWS4
-rw-r--r--src/ChangeLog2
-rw-r--r--src/config.in3
-rw-r--r--src/lisp.h7
7 files changed, 43 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 704647f3bc6..819b6ebfa7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-02 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * configure.in (--enable-use-lisp-union-type): New flag.
+
2010-06-30 Dan Nicolaescu <dann@ics.uci.edu>
Fix CFLAGS for non-GCC compilers.
diff --git a/configure b/configure
index cb353569d78..e89b7411ce6 100755
--- a/configure
+++ b/configure
@@ -825,6 +825,7 @@ enable_asserts
enable_maintainer_mode
enable_locallisppath
enable_checking
+enable_use_lisp_union_type
enable_profiling
enable_autodepend
enable_largefile
@@ -1477,6 +1478,10 @@ Optional Features:
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.
@@ -2978,6 +2983,17 @@ $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}"
@@ -4290,7 +4306,7 @@ if test x$GCC = xyes; then
C_OPTIMIZE_SWITCH=-O2
test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
else
- C_OPTIMIZE_SWITCH=-O
+ C_OPTIMIZE_SWITCH=-O
test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
fi
diff --git a/configure.in b/configure.in
index 97e2adc753c..b04bf6ea744 100644
--- a/configure.in
+++ b/configure.in
@@ -305,6 +305,16 @@ if test x$ac_gc_check_cons_list != x ; then
[Define this to check for errors in cons list.])
fi
+AC_ARG_ENABLE(use-lisp-union-type,
+[AS_HELP_STRING([--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.])],
+if test "${enableval}" != "no"; then
+ AC_DEFINE(USE_LISP_UNION_TYPE, 1,
+ [Define this to use a lisp union for the Lisp_Object data type.])
+fi)
+
+
AC_ARG_ENABLE(profiling,
[AS_HELP_STRING([--enable-profiling],
[build emacs with profiling support.
diff --git a/etc/NEWS b/etc/NEWS
index f342b3f1f7a..2b80bef2429 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -47,6 +47,10 @@ to configure. Note that other libraries used by Emacs, RSVG and GConf,
also depend on Gtk+. You can disable them with --without-rsvg and
--without-gconf.
+** There is a new configure option --enable-use-lisp-union-type.
+This is only useful for Emacs developers to debug certain types of bugs.
+These is not a new feature; only the configure flag is new.
+
* Startup Changes in Emacs 24.1
diff --git a/src/ChangeLog b/src/ChangeLog
index 45d8bf3fc4f..46d41bf24bd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
2010-07-02 Dan Nicolaescu <dann@ics.uci.edu>
+ * lisp.h: Document that USE_LISP_UNION_TYPE is now enabled using autoconf.
+
Cleanup old code.
* dired.c (BSD4_3): Remove all uses, redundant with BSD4_2.
* syssignal.h: Remove code for Lynx, not supported anymore.
diff --git a/src/config.in b/src/config.in
index 962edf62571..b1370dcbb95 100644
--- a/src/config.in
+++ b/src/config.in
@@ -933,6 +933,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* 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
diff --git a/src/lisp.h b/src/lisp.h
index 1941a2471a4..0da668bb87f 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -95,10 +95,9 @@ extern void die P_((const char *, const char *, int)) NO_RETURN;
#endif
#endif /* ENABLE_CHECKING */
-/* Define this to make Lisp_Object use a union type instead of the
- default int. FIXME: It might be better to add a flag to configure
- to do this. */
-/* #define USE_LISP_UNION_TYPE */
+/* Use the configure flag --enable-use-lisp-union-type to make
+ Lisp_Object use a union type instead of the default int. The flag
+ causes USE_LISP_UNION_TYPE to be defined. */
/***** Select the tagging scheme. *****/
/* There are basically two options that control the tagging scheme: