Menu

#163 Put a copy of wxwin.m4 inside m4/

Undefined
open
None
Feature_Request
2018-12-05
2015-05-02
No

I have a tiny feature request: would it be possible to put a copy of wxwin.m4 from the latest version of wxWidgets inside m4/wxwin.m4 in your source tree? That would greatly simplify running ./bootstrap in cases where wxwin.m4 is not installed on the system under default location. (The file wxwin.m4 from wxWidgets 3.0 works with both 2.8 and 3.0.)

Thank you.

Discussion

  • Teodor Petrov

    Teodor Petrov - 2015-05-02

    I don't think this is a good idea.
    What are the problem you're having?
    Isn't the wxwin.m4 file installed with the wxwidgets package or the devel version of it?

     
  • Mojca Miklavec

    Mojca Miklavec - 2015-05-02

    The "problem" is simply that ./bootstrap doesn't work if I don't make some extra effort and either copy the mentioned file or do something else.

    We are packaging wxWidgets in a way that allows coexistence of wxWidgets 2.8, wxWidgets 3.0, wxGTK 2.8, wxGTK 3.0 (and potentially others). As a consequence wxWidgets files end up under /some/weird/path/wxWidgets/3.0/share/aclocal/wxwin.m4.

    With --with-wxdir=/some/weird/path/wxWidgets/3.0/bin (or whatever that command is exactly) 95% of cases are covered, but autoconf isn't. There's of course a lot of room for improvement of our packaging of wxWidgets, but most software either distributes a "configure" file (so I don't notice the problem) or simply puts that file into their own "m4" subfolder, so that one no longer depends on wxwin.m4 to be present on the system when ./bootstrap is being run. It would also guarantee that everyone gets "the same" configure file even when using wxWidgets 2.8.

     
  • Teodor Petrov

    Teodor Petrov - 2015-05-02

    As far as I know we're shipping a configure script in official versions.
    Also you can make one if you do make dist.

    As far as I'm concerned, bootstrap (or whatever script is responsible for copying other m4 files) should be able to find where the wxwin.m4 file is located and copy it automagically.

    Can you list what are the locations where you install the files and what is the error?

     
  • Mojca Miklavec

    Mojca Miklavec - 2015-05-03

    Yes, the configure script is shipped with the released version, but the released version is so old (lots of problems with wxWidgets 3.0, but mainly lacking patches that have been added yesterday) that I prefer to use the version from SVN and I need to run ./bootstrap on that one.

    The problem is that wxwin.m4 is located under these four locations:

    $prefix/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/share/aclocal/wxwin.m4
    $prefix/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.8/share/aclocal/wxwin.m4
    $prefix/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/3.0/share/aclocal/wxwin.m4
    $prefix/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/2.8/share/aclocal/wxwin.m4
    

    This is no problem during configure as I simply pass

    --with-wxdir=$prefix/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0
    

    to configure script, but ./bootstrap chokes. The workaround is to manually copy wxwin.m4 to the directory where Code::Blocks sources are checked out.

    This is the error:

    configure.ac:91: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
          If this token and others are legitimate, please use m4_pattern_allow.
          See the Autoconf documentation.
    configure.ac:92: error: possibly undefined macro: AM_PATH_WXCONFIG
    
     
  • Teodor Petrov

    Teodor Petrov - 2015-05-03
    • assigned_to: Jens Lody
     
  • Jens Lody

    Jens Lody - 2015-05-03

    Did you try to set the environment-variable ACLOCAL_PATH before running ./bootstrap ?
    See: https://www.gnu.org/software/automake/manual/automake.html#ACLOCAL_005fPATH , if that works, it would be the simplest solution I think.

     
  • Mojca Miklavec

    Mojca Miklavec - 2015-05-04

    It took me a while to figure out where to set ACLOCAL_PATH in the package management systems, but I expected it to work and it did work when I found it.

    Both copying the file and setting ACLOCAL_PATH work, so there are feasible workarounds, that's not a serious issue. Having the file ready would be a "convenience", but if you are uncomfortable with that, there's no problem, feel free to close the ticket as "won't fix".

     
  • Roman Orekhov

    Roman Orekhov - 2016-03-02

    I recently ran into the very same problem: --with-wxdir=path wouldn't work if the wxWidgets pointed to by path is not installed (with same errors).
    Being a novice in autotools I spent some hours before I ended up solving the problem via http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Linux :
    I did export ACLOCAL_FLAGS="-I path", appended $ACLOCAL_FLAGS to strings "ACLOCAL_AMFLAGS = -I m4" in makefiles and it built.

    I'd consider that as bug because --with-wxdir just doesn't work as it should according to help, nothing in the scripts tries to locate wxwin.m4 via the value of that path and use it to AC.

     

    Last edit: Roman Orekhov 2016-03-02
  • Martin Turski

    Martin Turski - 2018-01-21

    @Mojca Miklavec: thank you for telling that copying "wxwin.m4" is sufficient. I removed all wxWidgets packages from my APT and built straightly from Git and got some errors about macro "AM_PATH_WXCONFIG" not found.

     
  • ollydbg

    ollydbg - 2018-12-05

    I'm not quite sure, but I think I have meet the same issue, see my issue report here:
    Re: Bootstrap with no wxWidgets packet installed

    I will try the setting the ACLOCAL_PATH variable method and report back here. Thanks.

     

Log in to post a comment.