]> code.delx.au - gnu-emacs/blobdiff - configure.in
cedet/semantic/chart.el: Don't require semantic/find.
[gnu-emacs] / configure.in
index a70ea1606dfb73188983636618fdb53f29a60d77..f4096db294ed027a17db53f3af89aa03e92fb06f 100644 (file)
@@ -21,8 +21,8 @@ dnl
 dnl  You should have received a copy of the GNU General Public License
 dnl  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-AC_PREREQ(2.61)
-AC_INIT(emacs, 23.0.94)
+AC_PREREQ(2.62)
+AC_INIT(emacs, 23.1.50)
 AC_CONFIG_HEADER(src/config.h:src/config.in)
 AC_CONFIG_SRCDIR(src/lisp.h)
 
@@ -209,6 +209,83 @@ elif test "${enableval}" != "yes"; then
   locallisppath=${enableval}
 fi)
 
+AC_ARG_ENABLE(checking,
+[AS_HELP_STRING([--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])],
+[ac_checking_flags="${enableval}"],[])
+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 ;;
+       *)      AC_MSG_ERROR(unknown check category $check) ;;
+       esac
+done
+IFS="$ac_save_IFS"
+
+if test x$ac_enable_checking != x ; then
+  AC_DEFINE(ENABLE_CHECKING, 1,
+[Enable expensive run-time checking of data types?])
+fi
+if test x$ac_gc_check_stringbytes != x ; then
+  AC_DEFINE(GC_CHECK_STRING_BYTES, 1,
+[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.])
+fi
+if test x$ac_gc_check_stringoverrun != x ; then
+  AC_DEFINE(GC_CHECK_STRING_OVERRUN, 1,
+[Define this to check for short string overrun.])
+fi
+if test x$ac_gc_check_string_free_list != x ; then
+  AC_DEFINE(GC_CHECK_STRING_FREE_LIST, 1,
+[Define this to check the string free list.])
+fi
+if test x$ac_xmalloc_overrun != x ; then
+  AC_DEFINE(XMALLOC_OVERRUN_CHECK, 1,
+[Define this to check for malloc buffer overrun.])
+fi
+if test x$ac_gc_check_cons_list != x ; then
+  AC_DEFINE(GC_CHECK_CONS_LIST, 1,
+[Define this to check for errors in cons list.])
+fi
+
+AC_ARG_ENABLE(profiling,
+[AS_HELP_STRING([--enable-profiling],
+               [build emacs with profiling support.
+                This might not work on all platforms])],
+[ac_enable_profiling="${enableval}"],[])
+if test x$ac_enable_profiling != x ; then
+   PROFILING_CFLAGS="-DPROFILING=1 -pg"
+   PROFILING_LDFLAGS="-pg"
+else
+   PROFILING_CFLAGS=
+   PROFILING_LDFLAGS=
+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
@@ -329,6 +406,9 @@ dnl see the `changequote' comment above.
     case "${canonical}" in
       alpha*-*-netbsd*)        machine=alpha ;;
       i[3456]86-*-netbsd*) machine=intel386 ;;
+      mips-*-netbsd*)  machine=mips ;;
+      mipsel-*-netbsd*)        machine=mips ;;
+      mipseb-*-netbsd*)        machine=mips ;;
       powerpc-*-netbsd*) machine=macppc ;;
       sparc*-*-netbsd*)        machine=sparc ;;
       vax-*-netbsd*)   machine=vax ;;
@@ -864,7 +944,7 @@ configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
 
 /* Get the CFLAGS for real compilation.  */
 #ifdef __GNUC__
-configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
+configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
 #else
 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
 #endif
@@ -872,6 +952,8 @@ configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
 #endif /* not THIS_IS_CONFIGURE */
 ' > ${tempcname}
 
+LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
+
 # The value of CPP is a quoted variable reference, so we need to do this
 # to get its actual value...
 CPP=`eval "echo $CPP"`
@@ -2789,9 +2871,6 @@ typedef unsigned size_t;
 #define HAVE_X11R6_XIM
 #endif
 
-/* Should we enable expensive run-time checking of data types?  */
-#undef ENABLE_CHECKING
-
 #if defined __GNUC__ && (__GNUC__ > 2 \
                          || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
 #define NO_RETURN      __attribute__ ((__noreturn__))