fix, building
[libcoin.git] / Jamrules.configure
blob83763f1c55c25c196224e372cbc6e51792ce48de
1 rule -configure-test-libgmp- {
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, "123456789", 10);"
8         "return 0;"
9         "}"
10         : : "-lgmp"
11     ] ;
14 rule -configure- {
15     if ! $(PREFIX) {
16         PREFIX = /usr/local ;
17     }
18     local pp = [ Command "echo $(PREFIX) | sed \"s/\\//\\\\\\\\\\\//g\"" : dummy ] ;
19     Command "sed \"s/@prefix/\\$(pp)/\" ./libcoin.pc.in > ./libcoin.pc" ;
20     -configure-pkg-config-necessary-
21         "libex"         "libex"
22         "libcurl"       "libcurl"
23     ;
24     if [ -configure-test-libgmp- ] == 1 {
25         -configure-add-line- "LINKLIBS.all += -lgmp -lm ;" ;
26     } else {
27         Exit "libgmp not found" ;
28     }
29     if $(debug) {
30         -configure-add-line- "CFLAGS.all += -O0 -g3 ;" ;
31         -configure-add-line- "SubInclude TOP test ;" ;
32     } else {
33         -configure-add-line- "set-profile ;" ;
34     }
37 configure ;