Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does configure's --with-swig option require the directory instead of the binary itself? #1085

Closed
dbankieris opened this issue Nov 20, 2020 · 5 comments

Comments

@dbankieris
Copy link
Contributor

@alexlin0

Under Ubuntu 20.04, apt-get install swig installs SWIG 4.0 at /usr/bin/swig4.0 and links /usr/bin/swig to it. Trick is incompatible with SWIG 4.0 (#768), and installing SWIG 3.0 yields /usr/bin/swig3.0. I have no idea what's going on in autoconf, but configure's --with-swig option uses SWIG 4.0 no matter what I give it. Can we not require specification of the binary instead of its directory?

@dbankieris dbankieris changed the title Why does configure's --with-swig option require the path instead of the binary itself? Why does configure's --with-swig option require the directory instead of the binary itself? Nov 20, 2020
@spfennell
Copy link
Contributor

@dbankieris you can set the SWIG environment variable to /usr/bin/swig3.0 and configure will use that one instead. I can easily update --with-swig to be a path to the executable as well if you want me to make that change, or I can add a new option to preserve other people's swig configurations

@spfennell
Copy link
Contributor

@dbankieris you wrote the code that uses the SWIG directory instead of the executable by the way, so maybe you can answer your own question...
99d856a#diff-ec000cb7bbaebbc68c54d6b0d6610c0110071baeaec670d652e92a07f3ec0a49
@alexlin0 @jmpenn

@spfennell
Copy link
Contributor

@dbankieris you wrote the code that uses the SWIG directory instead of the executable by the way, so maybe you can answer your own question...
99d856a#diff-ec000cb7bbaebbc68c54d6b0d6610c0110071baeaec670d652e92a07f3ec0a49
@alexlin0 @jmpenn

Well, I wrote it, but then you updated it. It was a team effort. I'm looking at the code I wrote 2 years ago and rolling my eyes.

@dbankieris
Copy link
Contributor Author

Ah, yes. We now use AX_PKG_SWIG, which uses AC_PATH_PROGS to search paths for swig, swig3.0, or swig2.0 and allows us to specify a minimum version. Maybe we could hack our own AX_PKG_SWIG, but it's probably not worth it.

I'm going to slowly back away and pretend I never created this issue...

@spfennell
Copy link
Contributor

It's not that hard to hack. Just have --with-swig set SWIG in configure's environment. Then AX_PKG_SWIG will use SWIG instead of PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants