~ubuntu-branches/ubuntu/feisty/xfce-mcs-plugins/feisty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Gauvain Pocentek
  • Date: 2006-11-09 14:38:21 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20061109143821-afj4d44kjteo8olx
Tags: 4.3.99.2-0ubuntu1
New upstream release (4.4RC2)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7437
7437
])
7438
7438
 
7439
7439
 
 
7440
dnl $Id: xdt-features.m4 22990 2006-09-02 11:33:28Z benny $
 
7441
dnl
 
7442
dnl Copyright (c) 2002-2006
 
7443
dnl         The Xfce development team. All rights reserved.
 
7444
dnl
 
7445
dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
 
7446
dnl
 
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.
 
7451
dnl
 
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
 
7455
dnl more details.
 
7456
dnl
 
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
 
7460
dnl
 
7461
dnl xdt-depends
 
7462
dnl -----------
 
7463
dnl  Contains M4 macros to check for software dependencies.
 
7464
dnl  Partly based on prior work of the XDG contributors.
 
7465
dnl
 
7466
 
 
7467
 
 
7468
 
 
7469
dnl We need recent a autoconf version
 
7470
AC_PREREQ([2.53])
 
7471
 
 
7472
 
 
7473
 
 
7474
dnl XDT_FEATURE_DEBUG()
 
7475
dnl
 
7476
AC_DEFUN([XDT_FEATURE_DEBUG],
 
7477
[
 
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])
 
7482
 
 
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])
 
7486
 
 
7487
    if test x"$GCC" = x"yes"; then
 
7488
      xdt_cv_additional_CFLAGS="-Wall"
 
7489
    fi
 
7490
    xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -DXFCE_DISABLE_DEPRECATED"
 
7491
    
 
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"
 
7496
      fi
 
7497
      AC_MSG_RESULT([full])
 
7498
    else
 
7499
      if test x"$GCC" = x"yes"; then
 
7500
        xdt_cv_additional_CFLAGS="-g $xdt_cv_additional_CFLAGS"
 
7501
      fi
 
7502
      AC_MSG_RESULT([yes])
 
7503
    fi
 
7504
 
 
7505
    CFLAGS="$CFLAGS $xdt_cv_additional_CFLAGS"
 
7506
    CXXFLAGS="$CXXFLAGS $xdt_cv_additional_CFLAGS"
 
7507
  else
 
7508
    AC_MSG_RESULT([no])
 
7509
  fi
 
7510
])
 
7511
 
 
7512
 
 
7513
 
 
7514
dnl BM_DEBUG_SUPPORT()
 
7515
dnl
 
7516
AC_DEFUN([BM_DEBUG_SUPPORT],
 
7517
[
 
7518
dnl # --enable-debug
 
7519
  AC_REQUIRE([XDT_FEATURE_DEBUG])
 
7520
 
 
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])
 
7528
 
 
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])
 
7534
  else
 
7535
    AC_MSG_RESULT([no])
 
7536
  fi
 
7537
 
 
7538
dnl # --enable-gcov
 
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])
 
7545
 
 
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])
 
7550
  else
 
7551
    AC_MSG_RESULT([no])
 
7552
  fi
 
7553
 
 
7554
dnl # --disable-asserts
 
7555
  AC_ARG_ENABLE([asserts],
 
7556
AC_HELP_STRING([--disable-asserts], [Disable assertions [DANGEROUS]]),
 
7557
    [], [enable_asserts=yes])
 
7558
 
 
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"
 
7564
  else
 
7565
    AC_MSG_RESULT([no])
 
7566
  fi
 
7567
 
 
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])
 
7573
 
 
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])
 
7582
        ;;
 
7583
    *)
 
7584
      AC_MSG_RESULT([no])
 
7585
        ;;
 
7586
    esac
 
7587
  else
 
7588
    AC_MSG_RESULT([no])
 
7589
  fi
 
7590
])
 
7591
 
7440
7592
dnl $Id: xdt-i18n.m4 21591 2006-05-08 09:10:26Z benny $
7441
7593
dnl
7442
7594
dnl Copyright (c) 2002-2006