source: git/libthread/auto.def @ 54b24c

spielwiese
Last change on this file since 54b24c was 54b24c, checked in by Reimer Behrends <behrends@…>, 5 years ago
Finalizing thread support.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1# vi:filetype=tcl
2#
3# configuration for libsingthreads
4
5use cc cc-shared
6
7source autoutil.tcl
8
9options {
10  singular:.. => "path to singular directory"
11  threads=1 => "disable thread support"
12  location:system => {
13      If and where to install the Singular thread bindings.
14
15      local  - do not install them.
16      system - install them in the Singular directory.
17      <dir>  - install them in directory <dir>.
18  }
19}
20
21set SINGULAR [opt-val singular ..]
22
23if {![file isdirectory $SINGULAR]} {
24  user-error "Singular path is not a directory"
25}
26
27set LOCATION_LIB {}
28set LOCATION_MOD {}
29
30switch -glob -- [opt-val location system] {
31  local {}
32  system {
33    set LOCATION_LIB $SINGULAR/Singular/LIB
34    set LOCATION_MOD $SINGULAR/Singular/MOD
35  }
36  /* {
37    set LOCATION_LIB [opt-val location]
38    set LOCATION_MOD [opt-val location]
39  }
40  ./* {
41    set LOCATION_LIB [opt-val location]
42    set LOCATION_MOD [opt-val location]
43  }
44  default {
45    user-error "Invalid value for --location"
46  }
47}
48
49if {[string equal $LOCATION_LIB ""]} {
50  define INSTALLATION ""
51} else {
52  set LOCATION_LIB [shell-quote $LOCATION_LIB]
53  set LOCATION_MOD [shell-quote $LOCATION_MOD]
54  define INSTALLATION "\ttools/install.sh -c -m 644 systhreads.lib $LOCATION_LIB
55\ttools/install.sh -c -m 644 systhreads.so $LOCATION_MOD
56\ttools/install.sh -c -m 644 threadtasks.lib $LOCATION_LIB
57"
58}
59set sing_includes {}
60foreach inc [list $SINGULAR $SINGULAR/factory/include $SINGULAR/libpolys] {
61  lappend sing_includes $inc
62}
63
64set sing_libs ""
65
66define SING_INCLUDES [-I {*}$sing_includes]
67define SING_LIBS $sing_libs
68
69if {[opt-bool threads] && [file exists "$SINGULAR/factory/prelude.h"]} {
70  msg-result "Enabling thread support"
71  define ENABLE_THREADS 1
72} else {
73  msg-result "Disabling thread support"
74  define ENABLE_THREADS 0
75}
76
77make-config-header threadconf.h -auto {ENABLE_*}
78make-template Makefile.in
Note: See TracBrowser for help on using the repository browser.