[buddy]
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.
This commit is contained in:
parent
cdede3d134
commit
35de7e9008
8 changed files with 57 additions and 31 deletions
|
|
@ -1,3 +1,15 @@
|
||||||
|
2011-04-10 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||||
|
|
||||||
|
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 <adl@lrde.epita.fr>
|
2011-04-04 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||||
|
|
||||||
Tag functions with attributes pure, const, or noreturn.
|
Tag functions with attributes pure, const, or noreturn.
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,13 @@ AC_CONFIG_AUX_DIR([tools])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
AM_INIT_AUTOMAKE([foreign nostdinc no-define 1.7.3])
|
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
|
AC_PROG_CC
|
||||||
|
|
||||||
AM_PROG_LEX
|
AM_PROG_LEX
|
||||||
|
|
@ -13,9 +20,17 @@ AC_PROG_CXX
|
||||||
|
|
||||||
LT_INIT([win32-dll])
|
LT_INIT([win32-dll])
|
||||||
|
|
||||||
|
adl_ENABLE_DEBUG
|
||||||
|
ad_GCC_OPTIM
|
||||||
|
adl_NDEBUG
|
||||||
|
|
||||||
buddy_INTEL
|
buddy_INTEL
|
||||||
buddy_DEBUG_FLAGS
|
buddy_DEBUG_FLAGS
|
||||||
|
|
||||||
|
if test x$enable_warnings = xyes; then
|
||||||
|
CF_GCC_WARNINGS
|
||||||
|
fi
|
||||||
|
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
|
|
|
||||||
22
buddy/m4/bdebug.m4
Normal file
22
buddy/m4/bdebug.m4
Normal file
|
|
@ -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
|
||||||
|
])
|
||||||
|
|
@ -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
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1
buddy/m4/debug.m4
Symbolic link
1
buddy/m4/debug.m4
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../m4/debug.m4
|
||||||
1
buddy/m4/devel.m4
Symbolic link
1
buddy/m4/devel.m4
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../m4/devel.m4
|
||||||
1
buddy/m4/gccoptim.m4
Symbolic link
1
buddy/m4/gccoptim.m4
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../m4/gccoptim.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],
|
AC_DEFUN([CF_GCC_WARNINGS],
|
||||||
[if test -n "$GCC"; then
|
[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 <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line __oline__ "configure"
|
#line __oline__ "configure"
|
||||||
|
|
@ -23,7 +23,6 @@ EOF
|
||||||
cf_save_CFLAGS="$CFLAGS"
|
cf_save_CFLAGS="$CFLAGS"
|
||||||
ac_cv_prog_gcc_warn_flags="-W -Wall"
|
ac_cv_prog_gcc_warn_flags="-W -Wall"
|
||||||
for cf_opt in \
|
for cf_opt in \
|
||||||
Waggregate-return \
|
|
||||||
Wbad-function-cast \
|
Wbad-function-cast \
|
||||||
Wcast-align \
|
Wcast-align \
|
||||||
Winline \
|
Winline \
|
||||||
|
|
@ -34,7 +33,7 @@ EOF
|
||||||
Wmissing-prototypes \
|
Wmissing-prototypes \
|
||||||
Wstrict-prototypes \
|
Wstrict-prototypes \
|
||||||
Wshadow \
|
Wshadow \
|
||||||
Wcast-qual \
|
Wcast-qual
|
||||||
do
|
do
|
||||||
CFLAGS="$cf_save_CFLAGS $ac_cv_prog_gcc_warn_flags -$cf_opt"
|
CFLAGS="$cf_save_CFLAGS $ac_cv_prog_gcc_warn_flags -$cf_opt"
|
||||||
if AC_TRY_EVAL(ac_compile); then
|
if AC_TRY_EVAL(ac_compile); then
|
||||||
|
|
@ -43,9 +42,8 @@ EOF
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
dnl CFLAGS="$cf_save_CFLAGS"
|
CFLAGS="$cf_save_CFLAGS"
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
dnl AC_SUBST([WARNING_CFLAGS], ["${ac_cv_prog_gcc_warn_flags}"])
|
CFLAGS="$CFLAGS ${ac_cv_prog_gcc_warn_flags}"
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
||||||
1
buddy/m4/ndebug.m4
Symbolic link
1
buddy/m4/ndebug.m4
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../m4/ndebug.m4
|
||||||
Loading…
Add table
Add a link
Reference in a new issue