Changeset 1346 for trunk


Ignore:
Timestamp:
Mar 6, 2011, 5:33:22 PM (10 years ago)
Author:
Peter Johansson
Message:

fixes #497. use value from 'pkg-config --cflags'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r1337 r1346  
    206206  # copy flags if we have found pc file
    207207  AS_IF([test "$use_plplot_pc" = "yes"], [
     208    # plplot typically returns <prefix>/include/plplot because plplot
     209    # people assumes users include header files as <foo.h>. We prefer
     210    # including files as <plplot/foo.h> and therefore need to trim off
     211    # trailing '/plplot'. Space is included in sed expression to avoid
     212    # substituting potential '/plplot' in PREFIX.
     213    YAT_CPP_ADD_FLAG([CPPFLAGS],
     214             [`$PKG_CONFIG plplotd-c++ --cflags-only-I | sed 's|/plplot | |g'`])
    208215    YAT_LD_ADD_FLAG([LDFLAGS], [`$PKG_CONFIG plplotd-c++ --libs-only-L`])
    209216    PLPLOT_LIBS="`$PKG_CONFIG plplotd-c++ --libs-only-l --libs-only-other`"
     
    213220    AS_IF([test -n "$with_plplot" && test "x$with_plplot" != "xyes"], [
    214221      YAT_LD_ADD_FLAG([LDFLAGS], [-L$with_plplot/lib])
     222      YAT_CPP_ADD_FLAG([CPPFLAGS], [-I$with_plplot/include])
    215223    ])
    216   ])
    217   # don't use `pkg-config --cflags' because it returns
    218   # `PREFIX/include/plplot' rather than `PREFIX/include'
    219   AS_IF([test -n "$with_plplot" && test "x$with_plplot" != "xyes"], [
    220     YAT_CPP_ADD_FLAG([CPPFLAGS], [-I$with_plplot/include])
    221224  ])
    222225])
     
    225228  AC_CHECK_HEADER([plplot/plstream.h], [], [plplot_found="noheader"])
    226229])
    227 
    228230
    229231AS_IF([test "x$plplot_found" = "xyes" && test -n "$PKG_CONFIG"], [
Note: See TracChangeset for help on using the changeset viewer.