1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 16:43:33 +02:00

Round 10 of wx3 changes

configure script now auto detects whether wxWidgets was built using
gtk2 or gtk3, so there's no longer a need to specify which one when
running configure.

VST support updated for wx3 under GTK.
This commit is contained in:
Leland Lucius
2015-07-18 01:22:05 -05:00
parent 47f8d10de3
commit ed419f1917
13 changed files with 307 additions and 237 deletions

View File

@@ -788,7 +788,6 @@ enable_libtool_lock
enable_static_wx
enable_unicode
enable_debug
enable_gtk3
with_wx_version
with_wx_config
'
@@ -1445,7 +1444,6 @@ Optional Features:
--enable-static-wx link wx statically (default=no)
--enable-unicode enable unicode support (default=no)
--enable-debug enable debug support (default=none)
--enable-gtk3 enable use of GTK+-3.0 (default: use GTK+-2.0)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1939,6 +1937,48 @@ fi
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_link
# ac_fn_cxx_try_run LINENO
# ------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_cxx_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then :
ac_retval=0
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_run
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -2925,6 +2965,16 @@ fi
#
# We use C++
#
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
#
# Checks for programs.
#
@@ -3429,11 +3479,11 @@ else
CXXFLAGS=
fi
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
@@ -4497,11 +4547,11 @@ if ac_fn_c_try_compile "$LINENO"; then :
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
@@ -6112,6 +6162,7 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
if test -n "$ac_tool_prefix"; then
for ac_prog in ar
do
@@ -6242,7 +6293,7 @@ main ()
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
if ac_fn_cxx_try_compile "$LINENO"; then :
echo conftest.$ac_objext > conftest.lst
lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
@@ -8104,7 +8155,6 @@ done
func_stripname_cnf ()
{
case ${2} in
@@ -12096,11 +12146,11 @@ $as_echo "$enable_static" >&6; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
CC="$lt_save_CC"
@@ -12234,11 +12284,11 @@ as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
else
_lt_caught_CXX_error=yes
@@ -15287,11 +15337,11 @@ fi
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
fi # test "$_lt_caught_CXX_error" != yes
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
@@ -15319,6 +15369,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
#
# Checks for libraries.
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
if ${ac_cv_header_stdc+:} false; then :
@@ -15339,7 +15390,7 @@ main ()
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_header_stdc=yes
else
ac_cv_header_stdc=no
@@ -15412,7 +15463,7 @@ main ()
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
if ac_fn_cxx_try_run "$LINENO"; then :
else
ac_cv_header_stdc=no
@@ -15459,14 +15510,6 @@ else
fi
# Check whether --enable-gtk3 was given.
if test "${enable_gtk3+set}" = set; then :
enableval=$enable_gtk3; enable_gtk3=$enableval
else
enable_gtk3=no
fi
# Check whether --with-wx-version was given.
if test "${with_wx_version+set}" = set; then :
@@ -15543,11 +15586,34 @@ WX_LIBS=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk3 use in wxWidgets" >&5
$as_echo_n "checking for gtk3 use in wxWidgets... " >&6; }
CPPFLAGS="${WX_CXXFLAGS}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wx/wx.h>
#if defined(__WXGTK3__)
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "yes" >/dev/null 2>&1; then :
enable_gtk3=yes
else
enable_gtk3=no
fi
rm -f conftest*
if [ "$enable_gtk3" = yes ]; then
gtk_version=gtk+-3.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
gtk_version=gtk+-2.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -15556,6 +15622,8 @@ fi
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.

View File

@@ -10,6 +10,11 @@ AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 dist-xz foreign no-dist-gzip subdir-objects -Wall])
AM_MAINTAINER_MODE([disable])
#
# We use C++
#
AC_LANG_CPLUSPLUS
#
# Checks for programs.
#
@@ -41,11 +46,6 @@ AC_ARG_ENABLE(debug,
debug_preference="--debug=$enableval",
debug_preference="")
AC_ARG_ENABLE(gtk3,
[AS_HELP_STRING([--enable-gtk3],[enable use of GTK+-3.0 (default: use GTK+-2.0)])],
enable_gtk3=$enableval,
enable_gtk3=no)
AC_ARG_WITH(wx-version,
[AS_HELP_STRING([--with-wx-version],[override default wxWidgets version [2.6,2.8]])],
wx_preference="--version=$withval",
@@ -70,12 +70,24 @@ WX_LIBS=""
AC_SUBST([WX_CXXFLAGS])
AC_SUBST([WX_LIBS])
AC_SUBST(HAVE_GTK)
AC_MSG_CHECKING([for gtk3 use in wxWidgets])
CPPFLAGS="${WX_CXXFLAGS}"
AC_EGREP_CPP(yes,
[#include <wx/wx.h>
#if defined(__WXGTK3__)
yes
#endif
], enable_gtk3=yes, enable_gtk3=no)
if [[ "$enable_gtk3" = yes ]]; then
gtk_version=gtk+-3.0
AC_MSG_RESULT([yes])
else
gtk_version=gtk+-2.0
AC_MSG_RESULT([no])
fi
AC_SUBST(HAVE_GTK)
PKG_CHECK_MODULES(GTK, $gtk_version, have_gtk="yes", have_gtk="no")
dnl OS-specific configuration

View File

@@ -9,13 +9,13 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include <gtk/gtk.h>
#include "../FileDialog.h"
#include "wx/intl.h"
#include "wx/msgdlg.h"
#include <gtk/gtk.h>
#ifdef __UNIX__
#include <unistd.h> // chdir
#endif