vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
555 stars 92 forks source link

tirpc check assume it is in `/usr` prefix #290

Closed hfiguiere closed 2 years ago

hfiguiere commented 2 years ago

tirpc comes with a .pc file so this is what should be used to detect it. Instead configure tries to compile something assuming it is in /usr/include/tirpc.

johncbowman commented 2 years ago

What is a .pc file? Does it have something to do with pkg-config?

You may have noticed that we don't yet use pkg-config. If you install to non-standard locations, the recommended way right now is to adjust your configure options. For example, MacOS X users use

./configure CC=clang CXX=clang++ CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib

If you know pkg-config, a pull request would be welcome, if it doesn't break standard installations. See also https://github.com/vectorgraphics/asymptote/issues/40 (my prior attempts to address the latter issue did not succeed, but maybe you will).

hfiguiere commented 2 years ago

.pc are pkg-config files, yes.

johncbowman commented 2 years ago

By the way, if you do come up with a pull request, please be aware that on my Fedora 34 installation pkg-config does not know anything about tirpc and has only limited knowledge of other packages, like gsl. So we either need to work around this or maintain the status quo, which is not to rely on pkg-config:

pkg-config --cflags --libs tirpc Package tirpc was not found in the pkg-config search path. Perhaps you should add the directory containing `tirpc.pc' to the PKG_CONFIG_PATH environment variable Package 'tirpc', required by 'virtual:world', not found

pkg-config --cflags --libs gsl -lgsl -lgslcblas -lm

johncbowman commented 2 years ago

locate tirpc.pc /usr/lib64/pkgconfig/libtirpc.pc

locate gsl.pc /usr/lib64/pkgconfig/gsl.pc

johncbowman commented 2 years ago

Duplicate of #40.