|
From: Mojca M. <moj...@gm...> - 2014-06-20 07:59:24
|
On Fri, Jun 20, 2014 at 12:43 AM, Allin Cottrell wrote: > On Thu, 19 Jun 2014, Ethan A Merritt wrote: >> On Thursday, 19 June, 2014 22:27:46 Mojca Miklavec wrote: >>> On Thu, Jun 19, 2014 at 9:31 PM, Ethan A Merritt >> >>>>> So please also check whether wxWidgets are using gtk2 or gtk3 before >>>>> calling pkg-config to supply build flags. >>>> >>>> >>>> That's a chicken-or-egg dilemma. >>>> wx-config is supposed to tell us the version, but we need the version in >>>> order to call the correct wx-config. >>> >>> >>> I don't see any chicken here ;) >>> >>> Once gnuplot calls >>> WX_CXXFLAGS="`$WX_CONFIG --cxxflags >>> it already knows which $WX_CONFIG it is calling. >>> >>> The problematic line is only >>> PKG_CHECK_MODULES(GTK, [gtk+-2.0], have_gtk=yes, have_gtk=no) >>> >>> Gnuplot should run >>> "$WX_CONFIG" --basename | <grep something> >>> before asking for gtk+-2.0. >> >> >> On linux (at least on my machines) there are two different wx-configs, >> one for wx2 and one for wx3. You need to pick up the version from >> somewhere >> before you even know which one to run. > > > Running on Mac, Mojca may or may not realize that most, if not all, modern > Linux distros pack both gtk2 and gtk3, Yes, I know that. I have both gtk2 and gtk3 installed myself (on a Mac). > and therefore both variants of > wxWidgets may also be present. (Theoretically the number of wxWidgets installations is only limited by the disk space.) So yes, I'm aware that one can have both gtk2 and gtk3 installed. What I don't believe though is that any linux distribution would ship two copies of wxWidgets30 distribution, once compiled against GTK 2 and once compiled against GTK 3. But for the sake of argument let's assume that a machine has all of the following installed: - wxWidgets 2.8 with GTK 2 - wxWidgets 2.8 with GTK 3 (maybe that's not possible) - wxWidgets 3.0 with GTK 2 - wxWidgets 3.0 with GTK 3 Can you please write in pseudocode what exactly you mean / based on what would you pick wxWidgets then and how? > Software that supports both variants must therefore establish a policy. The > software that I work on, gretl, has chosen (bowing to the apparently > inevitable) to make gtk3 the default, if available, but we have a configure > option > > --enable-gtk2 > > Most users won't have to worry about this. If they only have gtk2, that will > be used regardless; if they only have gtk3, that will be used regardless; if > they have both, gtk3 will be used unless they apply this "enable" flag when > configuring. In the ConTeXt of gnuplot this would translate to: - if user has only wxWidgets 3.0, use 3.0 - if user has only wxWidgets 2.8, use 2.8 - if user has both, pick wxWidgets 3.0 Or what else exactly would you do with GTK versions? (I admit that MacPorts can have both wxWidgets 3.0 with Cocoa and wxWidgets 3.0 with GTK installed. But they are both "well hidden" and packages depending on either need to clearly specify the path to wxWidgets. I don't know a better way yet.) Mojca |