1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-02 23:23:53 +01:00

configure: add check for gcc 4.9.0 up-front

also sets -std=gnu++11 per wxWidgets requirement
closes bug #1506
This commit is contained in:
Darrell Walisser
2017-02-11 00:38:45 -05:00
parent 7517b2653e
commit ad24fee7dd
3 changed files with 122 additions and 8 deletions

78
configure vendored
View File

@@ -896,6 +896,7 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -1073,6 +1074,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1325,6 +1327,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1462,7 +1473,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1615,6 +1626,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -2887,7 +2899,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
am__api_version='1.14'
am__api_version='1.15'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -3059,8 +3071,8 @@ test "$program_suffix" != NONE &&
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
# Expand $ac_aux_dir to an absolute path.
am_aux_dir=`cd "$ac_aux_dir" && pwd`
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
@@ -3079,7 +3091,7 @@ else
$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
if test x"${install_sh}" != xset; then
if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -3407,8 +3419,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
@@ -3582,6 +3594,7 @@ END
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
# Check whether --enable-maintainer-mode was given.
@@ -19366,6 +19379,56 @@ done
if test "${ax_cv_c_compiler_vendor}" = "gnu"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gcc 4.9.0 or later" >&5
$as_echo_n "checking whether we are using gcc 4.9.0 or later... " >&6; }
if ${ax_cv_gcc_4_9_0+:} false; then :
$as_echo_n "(cached) " >&6
else
ax_cv_gcc_4_9_0=no
if test "$GCC" = "yes"; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __GNUC__
# if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ > 9) \
|| (__GNUC__ == 4 && __GNUC_MINOR__ == 9 && __GNUC_PATCHLEVEL__ >= 0)
yes;
# endif
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "yes" >/dev/null 2>&1; then :
ax_cv_gcc_4_9_0=yes
fi
rm -f conftest*
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_4_9_0" >&5
$as_echo "$ax_cv_gcc_4_9_0" >&6; }
if test "$ax_cv_gcc_4_9_0" = yes; then
gcc_ok=yes
else
gcc_ok=no
fi
if test x$gcc_ok = xno; then
as_fn_error $? "Audacity requires at least GCC 4.9" "$LINENO" 5
fi
CXXFLAGS="${CXXFLAGS} --std=gnu++11"
else
CXXFLAGS="${CXXFLAGS} --std=c++11"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for strict prototypes" >&5
$as_echo_n "checking CFLAGS for strict prototypes... " >&6; }
@@ -19607,7 +19670,6 @@ fi
flag=`echo "$wall_flags" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ preprocessor accepts the $wall_flags flag" >&5