Commit e5641f5b authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

* m4/debug.m4, m4/devel.m4, m4/gccoptim.m4, m4/ndebug.m4: New files.

* Makefile.am (EXTRA_DIST): Add them.
* configure.ac: Call adl_ENABLE_DEVEL, adl_ENABLE_DEBUG, ad_GCC_OPTIM,
and adl_NDEBUG.
parent 2e97e644
2003-10-01 Alexandre Duret-Lutz <aduret@src.lip6.fr>
* m4/debug.m4, m4/devel.m4, m4/gccoptim.m4, m4/ndebug.m4: New files.
* Makefile.am (EXTRA_DIST): Add them.
* configure.ac: Call adl_ENABLE_DEVEL, adl_ENABLE_DEBUG, ad_GCC_OPTIM,
and adl_NDEBUG.
2003-09-30 Alexandre Duret-Lutz <aduret@src.lip6.fr>
* src/tgba/state.hh (state_ptr_less_than, state_ptr_equal):
......
......@@ -9,9 +9,13 @@ SUBDIRS = $(MAYBE_BUDDY) $(MAYBE_LBTT) doc src wrap iface
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = \
m4/gccwarn.m4 \
m4/pypath.m4 \
m4/buddy.m4 \
m4/lbtt.m4 \
m4/debug.m4 \
m4/devel.m4 \
m4/gccoptim.m4 \
m4/gccwarn.m4 \
m4/gspnlib.m4 \
m4/lbtt.m4 \
m4/ndebug.m4 \
m4/pypath.m4 \
HACKING
......@@ -3,6 +3,7 @@ AC_INIT([spot], [0.0i])
AC_CONFIG_AUX_DIR([tools])
AM_INIT_AUTOMAKE([foreign nostdinc check-news 1.7.3])
adl_ENABLE_DEVEL
adl_CHECK_PYTHON
AC_PROG_CXX
......@@ -19,6 +20,9 @@ AX_CHECK_GSPNLIB
AC_PROG_LIBTOOL
CF_GXX_WARNINGS
adl_ENABLE_DEBUG
ad_GCC_OPTIM
adl_NDEBUG
AC_CHECK_PROG([DOT], [dot], [dot])
......
AC_DEFUN([adl_ENABLE_DEBUG],
[AC_ARG_ENABLE([debug],
[AC_HELP_STRING([--enable-debug],[enable debugging symbols])])
case "${enable_debug}" in
yes)
AC_DEFINE([DEBUG],1,[Define if you want debugging code.])
# We used to use -ggdb3 when supported, but not all tools
# are able to grok the resulting debug infos.
if test "${ac_cv_prog_cc_g}" = yes; then
CFLAGS="$CFLAGS -g"
fi
;;
no)
;;
*)
if test "${ac_cv_prog_cc_g}" = yes; then
CFLAGS="$CFLAGS -g"
fi
;;
esac])
AC_DEFUN([adl_ENABLE_DEVEL],
[AC_ARG_ENABLE([devel],
[AC_HELP_STRING([--enable-devel],
[turn on useful developer options])])
# Turn on devel options for development version, unless
# explicitely turned off.
if test -z "$enable_devel"; then
case $VERSION in
*[abcdefghijklmnopqrstuvwxyz])
enable_devel=yes ;;
esac
fi
if test x"$enable_devel" = xyes; then
enable_debug=${enable_debug-yes}
enable_warnings=${enable_warnings-yes}
enable_assert=${enable_assert-yes}
enable_optimizations=${enable_optimizations--O}
fi
])
dnl Adapted from Akim Demaille <akim@epita.fr> ad_GCC_WARNINGS.
AC_DEFUN([ad_GCC_OPTIM],
[AC_ARG_ENABLE([optimizations],
[AC_HELP_STRING([--disable-optimizations],
[turn off aggressive optimizations])])
if test -n "$GCC" -a "${enable_optimizations-yes}" = "yes"; then
AC_CACHE_CHECK([for gcc optimization options], ac_cv_prog_gcc_opt_flags,
[changequote(,)dnl
cat > conftest.$ac_ext <<EOF
#line __oline__ "configure"
int main(int argc, char *argv[]) { return argv[argc-1] == 0; }
EOF
changequote([,])dnl
cf_save_CFLAGS="$CFLAGS"
ac_cv_prog_gcc_opt_flags="-O3"
for cf_opt in \
ffast-math \
fstrict-aliasing \
fomit-frame-pointer
do
CFLAGS="$cf_save_CFLAGS $ac_cv_prog_gcc_opt_flags -$cf_opt"
if AC_TRY_EVAL([ac_compile]); then
ac_cv_prog_gcc_opt_flags="$ac_cv_prog_gcc_opt_flags -$cf_opt"
fi
done
rm -f conftest*
CFLAGS="$cf_save_CFLAGS $ac_cv_prog_gcc_opt_flags"])
else
case $enable_optimizations in
no) ;;
*) CFLAGS="$CFLAGS $enable_optimizations" ;;
esac
fi])
AC_DEFUN([adl_NDEBUG],
[AC_ARG_ENABLE([assert],
[AC_HELP_STRING([--enable-assert],[turn on assertions])])
if test "$enable_assert" != yes; then
CFLAGS="$CFLAGS -DNDEBUG"
fi])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment