mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-10 16:43:33 +02:00
Additional changes for wx3
These are mostly for getting it to build on Linux, but I've also created new configs in Visual Studio to make it easier to switch between wx2 and wx3. For Linux, you have to tell configure where to find the wx3 version of the wx-config script and, since some distros build wxWidgets v3 against GTK+ v3, you may also need to enable gtk3 with something like: ./configure --enable-gtk3 WX_CONFIG=/usr/bin/wx-config-3.0 On Windows, I've added "wx3-Debug" and "wx3-Release" to the existing "Debug" and "Release" configurations. They depend on you having your WXWIN environment variable pointing to your wx2 directory and a new WXWIN3 environment variable pointing to your wx3 directory. For instance, I have: WXWIN=C:\Users\yam\Documents\wxWidgets-2.8.13 WXWIN3=C:\Users\yam\Documents\wxWidgets-3.0.2 Doing this allows you to switch freely among the 4 configurations without having to get out of Visual Studio and monkey around with the environment. The project files will also add the location of the wxWidgets DLLs to the PATH when running Audacity from within Visual Studio. They add %WXWIN%\lib\vc_dll or %WXWIN3%\lib\vc_dll at the beginning of the PATH variable as appropriate. I expect that once we convert to wx3 we'll just drop back down to the normal Debug and Release configurations, but this should make switching between wx2 and wx3 much easier during the transition.
This commit is contained in:
168
lib-src/FileDialog/configure
vendored
168
lib-src/FileDialog/configure
vendored
@@ -649,6 +649,7 @@ GTK_CFLAGS
|
||||
PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG
|
||||
HAVE_GTK
|
||||
WX_LIBS
|
||||
WX_CXXFLAGS
|
||||
WX_CONFIG
|
||||
@@ -790,6 +791,7 @@ enable_libtool_lock
|
||||
enable_static_wx
|
||||
enable_unicode
|
||||
enable_debug
|
||||
enable_gtk3
|
||||
with_wx_version
|
||||
with_wx_config
|
||||
'
|
||||
@@ -1446,6 +1448,7 @@ 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]
|
||||
@@ -15347,6 +15350,14 @@ 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 :
|
||||
@@ -15419,6 +15430,8 @@ WX_LIBS=""
|
||||
|
||||
|
||||
|
||||
if [ "$enable_gtk3" = yes ]; then
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15543,6 +15556,78 @@ pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
|
||||
$as_echo_n "checking for GTK... " >&6; }
|
||||
|
||||
if test -n "$GTK_CFLAGS"; then
|
||||
pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$GTK_LIBS"; then
|
||||
pkg_cv_GTK_LIBS="$GTK_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0" 2>&1`
|
||||
else
|
||||
GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$GTK_PKG_ERRORS" >&5
|
||||
|
||||
have_gtk=no
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
have_gtk=no
|
||||
else
|
||||
GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
|
||||
GTK_LIBS=$pkg_cv_GTK_LIBS
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
have_gtk=yes
|
||||
fi
|
||||
else
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
|
||||
$as_echo_n "checking for GTK... " >&6; }
|
||||
|
||||
if test -n "$GTK_CFLAGS"; then
|
||||
pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
@@ -15597,17 +15682,89 @@ fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$GTK_PKG_ERRORS" >&5
|
||||
|
||||
have_gtk="no"
|
||||
have_gtk=no
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
have_gtk="no"
|
||||
have_gtk=no
|
||||
else
|
||||
GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
|
||||
GTK_LIBS=$pkg_cv_GTK_LIBS
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
have_gtk="yes"
|
||||
have_gtk=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
|
||||
$as_echo_n "checking for GTK... " >&6; }
|
||||
|
||||
if test -n "$GTK_CFLAGS"; then
|
||||
pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_version\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "$gtk_version") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "$gtk_version" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$GTK_LIBS"; then
|
||||
pkg_cv_GTK_LIBS="$GTK_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_version\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "$gtk_version") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "$gtk_version" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$gtk_version" 2>&1`
|
||||
else
|
||||
GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$gtk_version" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$GTK_PKG_ERRORS" >&5
|
||||
|
||||
have_gtk=no
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
have_gtk=no
|
||||
else
|
||||
GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
|
||||
GTK_LIBS=$pkg_cv_GTK_LIBS
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
have_gtk=yes
|
||||
fi
|
||||
|
||||
|
||||
@@ -15624,10 +15781,13 @@ case "${host_os}" in
|
||||
;;
|
||||
|
||||
*)
|
||||
if test "$have_gtk" = "yes"; then
|
||||
if [ "$have_gtk" = "yes" ]
|
||||
then
|
||||
|
||||
$as_echo "#define HAVE_GTK 1" >>confdefs.h
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
IMPLEMENTATION="gtk"
|
||||
fi
|
||||
;;
|
||||
|
Reference in New Issue
Block a user