diff --git a/buddy/ChangeLog b/buddy/ChangeLog index 480c21588..cd48a3a95 100644 --- a/buddy/ChangeLog +++ b/buddy/ChangeLog @@ -1,3 +1,15 @@ +2011-04-10 Alexandre Duret-Lutz + + Add support for --enable-devel and similar macros. + + * m4/debug.m4: Rename to ... + * m4/bdebug.m4: ... this. + * m4/debug.m4, m4/devel.m4, m4/gccoptim.m4, m4/ndebug.m4: New file. + * m4/gccwarns.m4: Fix usage of cache variable. Fix shell + syntax. Do not check for -Waggregate-return. Update CFLAGS. + * configure.ac: Adjust to handle --enable-devel and similar macros + in the same way as Spot. + 2011-04-04 Alexandre Duret-Lutz Tag functions with attributes pure, const, or noreturn. diff --git a/buddy/configure.ac b/buddy/configure.ac index 55549c151..f25b548ad 100644 --- a/buddy/configure.ac +++ b/buddy/configure.ac @@ -4,6 +4,13 @@ AC_CONFIG_AUX_DIR([tools]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign nostdinc no-define 1.7.3]) +# If the user didn't supply a CFLAGS value, +# set an empty one to prevent autoconf to stick -O2 -g here. +test -z "$CFLAGS" && CFLAGS= +test -z "$CXXFLAGS" && CXXFLAGS= + +adl_ENABLE_DEVEL + AC_PROG_CC AM_PROG_LEX @@ -13,9 +20,17 @@ AC_PROG_CXX LT_INIT([win32-dll]) +adl_ENABLE_DEBUG +ad_GCC_OPTIM +adl_NDEBUG + buddy_INTEL buddy_DEBUG_FLAGS +if test x$enable_warnings = xyes; then + CF_GCC_WARNINGS +fi + AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ diff --git a/buddy/m4/bdebug.m4 b/buddy/m4/bdebug.m4 new file mode 100644 index 000000000..65da9b457 --- /dev/null +++ b/buddy/m4/bdebug.m4 @@ -0,0 +1,22 @@ +AC_DEFUN([buddy_DEBUG_FLAGS], +[AC_ARG_ENABLE([swap-count], + [AC_HELP_STRING([--enable-swap-count], + [Count number of fundamental variable swaps (for debugging)])]) +case $enable_swap_count in + yes) + AC_DEFINE([SWAPCOUNT], 1, + [Define to 1 to count number of fundamental variable swaps + (for debugging).]) + ;; +esac + +AC_ARG_ENABLE([cache-stats], + [AC_HELP_STRING([--enable-cache-stats], + [Gather statistical information about operator and unique node caching (for debugging)])]) +case $enable_cache_stats in + yes) + AC_DEFINE([CACHESTATS], 1, + [Defube to 1 to gather statistical information about operator and unique node caching (for debugging).]) + ;; +esac +]) diff --git a/buddy/m4/debug.m4 b/buddy/m4/debug.m4 deleted file mode 100644 index afc0fb20e..000000000 --- a/buddy/m4/debug.m4 +++ /dev/null @@ -1,25 +0,0 @@ -AC_DEFUN([buddy_DEBUG_FLAGS], -[AC_ARG_ENABLE([swap-count], - [AC_HELP_STRING([--enable-swap-count], - [Count number of fundamental variable swaps (for debugging)])]) -case $enable_swap_count in - yes) - AC_DEFINE([SWAPCOUNT], 1, - [Define to 1 to count number of fundamental variable swaps - (for debugging).]) - ;; -esac - -AC_ARG_ENABLE([cache-stats], - [AC_HELP_STRING([--enable-cache-stats], - [Gather statistical information about operator and unique node caching (for debugging)])]) -case $enable_cache_stats in - yes) - AC_DEFINE([CACHESTATS], 1, - [Defube to 1 to gather statistical information about operator and unique node caching (for debugging).]) - ;; -esac -]) - - - \ No newline at end of file diff --git a/buddy/m4/debug.m4 b/buddy/m4/debug.m4 new file mode 120000 index 000000000..9298e153c --- /dev/null +++ b/buddy/m4/debug.m4 @@ -0,0 +1 @@ +../../m4/debug.m4 \ No newline at end of file diff --git a/buddy/m4/devel.m4 b/buddy/m4/devel.m4 new file mode 120000 index 000000000..07f930bfc --- /dev/null +++ b/buddy/m4/devel.m4 @@ -0,0 +1 @@ +../../m4/devel.m4 \ No newline at end of file diff --git a/buddy/m4/gccoptim.m4 b/buddy/m4/gccoptim.m4 new file mode 120000 index 000000000..d45ec4613 --- /dev/null +++ b/buddy/m4/gccoptim.m4 @@ -0,0 +1 @@ +../../m4/gccoptim.m4 \ No newline at end of file diff --git a/buddy/m4/gccwarns.m4 b/buddy/m4/gccwarns.m4 index 57024922b..2205c9f83 100644 --- a/buddy/m4/gccwarns.m4 +++ b/buddy/m4/gccwarns.m4 @@ -14,7 +14,7 @@ dnl A few other options have been left out because they are annoying in C++. AC_DEFUN([CF_GCC_WARNINGS], [if test -n "$GCC"; then - AC_CACHE_CHECK([for $GCC warning options], ac_cv_prog_gxx_warn_flags, + AC_CACHE_CHECK([for $GCC warning options], ac_cv_prog_gcc_warn_flags, [ cat > conftest.$ac_ext <