Changeset 33707 in project


Ignore:
Timestamp:
10/16/16 16:35:06 (4 years ago)
Author:
sjamaan
Message:

postgresql: Use pkg-config if available (thanks to Mario Goulart)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/postgresql/trunk/postgresql.setup

    r30481 r33707  
    11;;; postgresql.setup -*- Scheme -*-
    22
    3 (use files)
     3(use files utils)
     4
     5(define pkg-config-available?
     6  (handle-exceptions exn
     7    (begin
     8      (print "pkg-config is NOT available. Will use pg_config.")
     9      #f)
     10    (print "Checking if pkg-config is available...")
     11    (system* "pkg-config --version")
     12    (print "pkg-config is available.")
     13    #t))
    414
    515(define libpq-flags
    6   `(-C -I -C "\"`pg_config --includedir`\"" "-L\"`pg_config --libdir`\"" -rpath "`pg_config --libdir`" -lpq))
     16  (if pkg-config-available?
     17      '("`pkg-config --cflags libpq`" "`pkg-config --libs libpq`")
     18      '(-C -I -C "\"`pg_config --includedir`\""
     19           "-L\"`pg_config --libdir`\""
     20           -rpath "`pg_config --libdir`" -lpq)))
    721
    822(define PQescapeIdentifier-presence-checker #<<EOF
Note: See TracChangeset for help on using the changeset viewer.