fix
[libpgclient.git] / Jamrules.configure
blob8bff240abfcecf2072a90a2c7e747f8d5652ff5a
1 rule -configure-test-gmp- {
2     return [
3         -configure-test-compile-cc- "libgmp" :
4         "#include <gmp.h>"
5         "int main () {"
6         "mpz_t x;"
7         "mpz_init_set_str(x, "1234567", 10);"
8         "return 0;"
9         "}"
10         : : "-lgmp"
11     ] ;
14 rule -configure- {
15     if ! $(PREFIX) {
16         PREFIX = /usr/local ;
17     }
18     -configure-pkg-config-necessary-
19         "libex"         "libex"
20         "uuid"          "uuid"
21     ;
22     local pp = [ Command "echo $(PREFIX) | sed \"s/\\//\\\\\\\\\\\//g\"" : dummy ] ;
23     Command "sed -e \"s/@prefix/\\$(pp)/\" ./libpgcli.pc.in > ./libpgcli.pc" ;
24     if [ -configure-test-gmp- ] == 1 {
25         -configure-add-line- "LINKLIBS.all += -lgmp -lm ;" ;
26     } else {
27         Exit "libgmp not found" ;
28     }
31 configure ;