Changeset ee0a1f3


Ignore:
Timestamp:
Jun 29, 2006, 4:14:01 PM (18 years ago)
Author:
Paul Brossier <piem@altern.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
a814968
Parents:
e3db73f
Message:

add kludge to check if $CC supports -Wextra
add kludge to check if $CC supports -Wextra

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    re3db73f ree0a1f3  
    2626AC_CANONICAL_HOST
    2727
    28 dnl Default optimization
    29 CFLAGS="$CFLAGS -O2"
    30 
    31 dnl Enable debugging (no)
    32 AC_ARG_ENABLE(debug,
    33   [  --enable-debug[[=value]]   compile with debug [[default=no]]],
    34   with_debug="yes",
    35   with_debug="no")
    36 if test "$with_debug" = "yes"
    37 then
    38   AC_DEFINE(DEBUG,1,[Define to enable debug])
    39   CFLAGS="$CFLAGS -g"
    40 fi
    41 
    42 dnl Enable full warnings (yes)
    43 AC_ARG_ENABLE(warnme,
    44   [  --enable-warnme[[=value]]   compile with all -W [[default=yes]]],
    45   with_warnme="no",
    46   with_warnme="yes")
    47 if test "$with_warnme" = "yes"
    48 then
    49   CFLAGS="$CFLAGS -Wall -Wextra -Werror -Wmissing-prototypes -Wmissing-declarations -Wno-unused-parameter"
    50 fi
    51 
    5228dnl Check for programs
    5329AC_PROG_CC
     
    5632fi
    5733AC_PROG_INSTALL
     34
     35dnl Default optimization
     36CFLAGS="$CFLAGS -O2"
     37
     38dnl Enable debugging (no)
     39AC_ARG_ENABLE(debug,
     40  [  --enable-debug[[=value]]  compile with debug [[default=no]]],
     41  with_debug="yes",
     42  with_debug="no")
     43if test "$with_debug" = "yes"
     44then
     45  AC_DEFINE(DEBUG,1,[Define to enable debug])
     46  CFLAGS="$CFLAGS -g"
     47fi
     48
     49dnl Enable full warnings (yes)
     50AC_ARG_ENABLE(warnme,
     51  [  --enable-warnme[[=value]] compile with all -W [[default=yes]]],
     52  with_warnme="no",
     53  with_warnme="yes")
     54if test "$with_warnme" = "yes"
     55then
     56  dnl Check for -Wextra support to allow compilation on gcc <= 3.4
     57  AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra,
     58  [old_CFLAGS="$CFLAGS"
     59  CFLAGS="$CFLAGS -Wextra"
     60  AC_COMPILE_IFELSE([void foo (void) {}],
     61          ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
     62  ])
     63  if test "$ac_cv_cc_wextra" = "yes"
     64  then
     65    CFLAGS="$old_CFLAGS -Wall -Wextra"
     66  else
     67    CFLAGS="$old_CFLAGS -Wall"
     68  fi
     69fi
     70
     71AC_ARG_ENABLE(failonerror,
     72  [  --enable-fwarn[[=value]]  fail on compilation warnings [[default=yes]]],
     73  with_warnme="no",
     74  CFLAGS="$CFLAGS -Werror -Wmissing-prototypes -Wmissing-declarations -Wno-unused-parameter")
    5875
    5976dnl Check for libtool
Note: See TracChangeset for help on using the changeset viewer.