7440
dnl $Id: xdt-features.m4 22990 2006-09-02 11:33:28Z benny $
7442
dnl Copyright (c) 2002-2006
7443
dnl The Xfce development team. All rights reserved.
7445
dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
7447
dnl This program is free software; you can redistribute it and/or modify it
7448
dnl under the terms of the GNU General Public License as published by the Free
7449
dnl Software Foundation; either version 2 of the License, or (at your option)
7450
dnl any later version.
7452
dnl This program is distributed in the hope that it will be useful, but WITHOUT
7453
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7454
dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
7457
dnl You should have received a copy of the GNU General Public License along with
7458
dnl this program; if not, write to the Free Software Foundation, Inc., 59 Temple
7459
dnl Place, Suite 330, Boston, MA 02111-1307 USA
7463
dnl Contains M4 macros to check for software dependencies.
7464
dnl Partly based on prior work of the XDG contributors.
7469
dnl We need recent a autoconf version
7474
dnl XDT_FEATURE_DEBUG()
7476
AC_DEFUN([XDT_FEATURE_DEBUG],
7478
AC_ARG_ENABLE([debug],
7479
AC_HELP_STRING([--enable-debug[=yes|no|full]], [Build with debugging support])
7480
AC_HELP_STRING([--disable-debug], [Include no debugging support [default]]),
7481
[], [enable_debug=no])
7483
AC_MSG_CHECKING([whether to build with debugging support])
7484
if test x"$enable_debug" != x"no"; then
7485
AC_DEFINE([DEBUG], [1], [Define for debugging support])
7487
if test x"$GCC" = x"yes"; then
7488
xdt_cv_additional_CFLAGS="-Wall"
7490
xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -DXFCE_DISABLE_DEPRECATED"
7492
if test x"$enable_debug" = x"full"; then
7493
AC_DEFINE([DEBUG_TRACE], [1], [Define for tracing support])
7494
if test x"$GCC" = x"yes"; then
7495
xdt_cv_additional_CFLAGS="-g3 -Werror $xdt_cv_additional_CFLAGS"
7497
AC_MSG_RESULT([full])
7499
if test x"$GCC" = x"yes"; then
7500
xdt_cv_additional_CFLAGS="-g $xdt_cv_additional_CFLAGS"
7502
AC_MSG_RESULT([yes])
7505
CFLAGS="$CFLAGS $xdt_cv_additional_CFLAGS"
7506
CXXFLAGS="$CXXFLAGS $xdt_cv_additional_CFLAGS"
7514
dnl BM_DEBUG_SUPPORT()
7516
AC_DEFUN([BM_DEBUG_SUPPORT],
7518
dnl # --enable-debug
7519
AC_REQUIRE([XDT_FEATURE_DEBUG])
7521
dnl # --enable-profiling
7522
AC_ARG_ENABLE([profiling],
7523
AC_HELP_STRING([--enable-profiling],
7524
[Generate extra code to write profile information])
7525
AC_HELP_STRING([--disable-profiling],
7526
[No extra code for profiling (default)]),
7527
[], [enable_profiling=no])
7529
AC_MSG_CHECKING([whether to build with profiling support])
7530
if test x"$enable_profiling" != x"no"; then
7531
CFLAGS="$CFLAGS -pg"
7532
LDFLAGS="$LDFLAGS -pg"
7533
AC_MSG_RESULT([yes])
7539
AC_ARG_ENABLE([gcov],
7540
AC_HELP_STRING([--enable-gcov],
7541
[compile with coverage profiling instrumentation (gcc only)])
7542
AC_HELP_STRING([--disable-gcov],
7543
[do not generate coverage profiling instrumentation (default)]),
7544
[], [enable_gcov=no])
7546
AC_MSG_CHECKING([whether to compile with coverage profiling instrumentation])
7547
if test x"$enable_gcov" != x"no"; then
7548
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7549
AC_MSG_RESULT([yes])
7554
dnl # --disable-asserts
7555
AC_ARG_ENABLE([asserts],
7556
AC_HELP_STRING([--disable-asserts], [Disable assertions [DANGEROUS]]),
7557
[], [enable_asserts=yes])
7559
AC_MSG_CHECKING([whether to disable assertions])
7560
if test x"$enable_asserts" = x"no"; then
7561
AC_MSG_RESULT([yes])
7562
CPPFLAGS="$CPPFLAGS -DG_DISABLE_CHECKS -DG_DISABLE_ASSERT"
7563
CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS"
7568
dnl # --enable-final
7569
AC_REQUIRE([AC_PROG_LD])
7570
AC_ARG_ENABLE([final],
7571
AC_HELP_STRING([--enable-final], [Build final version]),
7572
[], [enable_final=yes])
7574
AC_MSG_CHECKING([whether to build final version])
7575
if test x"$enable_final" = x"yes"; then
7576
AC_MSG_RESULT([yes])
7577
AC_MSG_CHECKING([whether $LD accepts -O1])
7578
case `$LD -O1 -v 2>&1 </dev/null` in
7579
*GNU* | *'with BFD'*)
7580
LDFLAGS="$LDFLAGS -Wl,-O1"
7581
AC_MSG_RESULT([yes])
7440
7592
dnl $Id: xdt-i18n.m4 21591 2006-05-08 09:10:26Z benny $
7442
7594
dnl Copyright (c) 2002-2006