From 7ed0376a6c728b6c30538272b3224c0768c0e1af Mon Sep 17 00:00:00 2001 From: "lllucius@gmail.com" Date: Mon, 20 Oct 2014 18:10:27 +0000 Subject: [PATCH] Bring back the GTK file chooser...fixes configure --- lib-src/FileDialog/configure | 154 ++------------------------------ lib-src/FileDialog/configure.ac | 6 +- 2 files changed, 10 insertions(+), 150 deletions(-) diff --git a/lib-src/FileDialog/configure b/lib-src/FileDialog/configure index f787cf511..c7cb761c7 100755 --- a/lib-src/FileDialog/configure +++ b/lib-src/FileDialog/configure @@ -15431,6 +15431,10 @@ WX_LIBS="" if [ "$enable_gtk3" = yes ]; then + gtk_version=gtk+-3.0 +else + gtk_version=gtk+-2.0 +fi @@ -15556,150 +15560,6 @@ 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 - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.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+-2.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+-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.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+-2.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+-2.0" 2>&1` - else - GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-2.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 -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 @@ -15754,17 +15614,17 @@ 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 diff --git a/lib-src/FileDialog/configure.ac b/lib-src/FileDialog/configure.ac index 1bdd1c16d..3595626ac 100644 --- a/lib-src/FileDialog/configure.ac +++ b/lib-src/FileDialog/configure.ac @@ -72,11 +72,11 @@ AC_SUBST([WX_LIBS]) AC_SUBST(HAVE_GTK) if [[ "$enable_gtk3" = yes ]]; then - PKG_CHECK_MODULES(GTK, gtk+-3.0, have_gtk=yes, have_gtk=no) + gtk_version=gtk+-3.0 else - PKG_CHECK_MODULES(GTK, gtk+-2.0, have_gtk=yes, have_gtk=no) + gtk_version=gtk+-2.0 fi -PKG_CHECK_MODULES(GTK, $gtk_version, have_gtk=yes, have_gtk=no) +PKG_CHECK_MODULES(GTK, $gtk_version, have_gtk="yes", have_gtk="no") dnl OS-specific configuration