Opened 10 years ago

Closed 10 years ago

#497 closed enhancement (fixed)

use 'pkg-config --cflags plplot-c++'

Reported by: Peter Johansson Owned by: Peter Johansson
Priority: minor Milestone: svndigest 0.10
Component: build Version: trunk
Keywords: Cc:

Description

configure doesn't fine plplot header files although I have pkg-config and relevant .pc file is found. I think our configure could be improved here.

We have the following snippet in configure.ac

  # don't use `pkg-config --cflags' because it returns
  # `PREFIX/include/plplot' rather than `PREFIX/include'
  AS_IF([test -n "$with_plplot" && test "x$with_plplot" != "xyes"], [
    YAT_CPP_ADD_FLAG([CPPFLAGS], [-I$with_plplot/include])
  ])

This is only helpful when using --with-plplot. My plplot is in pkg-config path but outside gcc's search path, so I'd like that configure uses the value from pkg-config --cflags. Unfortunately, it typically returns PREFIX/include/plplot rather than PREFIX/include, which assumes that one includes as

#include <plstream.h>

rather than

#include <plplot/plstream.h>

As we use the latter form in svndigest we need some tweaking here. One could try trimming off trailing plplot from pkg-config --cflags and see if that helps to find the header files. In case someone patches the .pc file we should probably try the raw value as well. Perhaps the raw value first(?).

Change History (2)

comment:1 Changed 10 years ago by Peter Johansson

Status: newassigned

comment:2 Changed 10 years ago by Peter Johansson

Resolution: fixed
Status: assignedclosed

(In [1346]) fixes #497. use value from 'pkg-config --cflags'

Note: See TracTickets for help on using tickets.