Re: [PATCH 1/1] config/{Makefile.SH,get_fltk}: include fltk's CXXFLAGS

Bill Allombert <[email protected]>
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <ZMqBKYVbF6R/d72V@seventeen>
On Tue, Aug 01, 2023 at 03:35:31PM -0400, Michael Orlitzky wrote:
> To test for fltk, pari compiles a test program using the output from
> "fltk-config --ldflags". That provides the necessary -l and -L flags,
> but if fltk's headers are in a nonstandard location, then the
> corresponding -I flags will be absent. This can cause a compilation
> failure (and thus feature misdetection) on e.g. Gentoo, where fltk's
> headers are stored in /usr/include/fltk rather than /usr/include.
> To fix the problem, this commit includes the output from "fltk-config
> --cxxflags" in the compilation command.
> 
> The same issue arises when compiling pari (plotfltk.c) itself, and the
> same fix applied to PLOTCFLAGS in Makefile.SH solves it.
> 
> This issue was originally debugged and fixed by François Bissey.

Thanks for your patch.

I think you also need this hunk:

diff --git a/config/get_graphic_lib b/config/get_graphic_lib
index 5e72fbf989..b685c13c58 100644
--- a/config/get_graphic_lib
+++ b/config/get_graphic_lib
@@ -3,7 +3,7 @@ if test "$optimization" = profiling; then
 fi

 _graphic_list="which_graphic_lib X11 X11_INC X11_LIBS \
-FLTK_LIBS QTDIR QTLIB gp_mime_open"
+FLTK_CXXFLAGS FLTK_LIBS QTDIR QTLIB gp_mime_open"

 if test -n "$with_fltk"; then which_graphic_lib=fltk; fi
 if test -n "$with_qt";   then which_graphic_lib=Qt; fi


I have commited the combination as GIT commit
9d84c29705119000fef53d50cbc681c00473a4b1
I hope this fixes your issues.

Cheers,
Bill
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.