Browse code

Removed dependence on rjags

git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/CoGAPS@57772 bc3139a8-67e5-0310-9ffc-ced21a209358

e.fertig authored on 01/09/2011 14:33:56
Showing25 changed files

... ...
@@ -1,5 +1,5 @@
1 1
 Package: CoGAPS
2
-Version: 1.3.0
2
+Version: 1.3.1
3 3
 Date: 2010-07-02
4 4
 Title: Coordinated Gene Activity in Pattern Sets 
5 5
 Author: Elana J. Fertig
... ...
@@ -10,9 +10,9 @@ Description: Coordinated Gene Activity in Pattern Sets (CoGAPS) infers
10 10
   inferring activity on gene sets. 
11 11
 Maintainer: Elana J. Fertig <ejfertig@jhmi.edu>, Michael F. Ochs <mfo@jhu.edu>
12 12
 SystemRequirements: GAPS-JAGS (==1.0.2)
13
-Depends: R (>= 2.9.0), rjags(>= 2.1.0), R.utils (>= 1.2.4)
13
+Depends: R (>= 2.9.0), R.utils (>= 1.2.4)
14 14
 Imports: graphics, grDevices, methods, stats, utils
15 15
 License: GPL (== 2)
16
-URL: http://www.cancerbiostats.onc.jhmi.edu/cogaps.cfm
16
+URL: http://www.cancerbiostats.onc.jhmi.edu/CoGAPS.cfm
17 17
 biocViews: GeneExpression, Microarray, Bioinformatics 
18 18
 
... ...
@@ -2,9 +2,16 @@ export(CoGAPS)
2 2
 export(GAPS)
3 3
 export(calcCoGAPSStat)
4 4
 export(plotGAPS)
5
+if(tools:::.OStype() == "windows") {
6
+importFrom(utils, readRegistry, winProgressBar, setWinProgressBar)
7
+}
8
+importFrom(utils, txtProgressBar, setTxtProgressBar)
9
+importFrom(stats, variable.names, sd, update)
5 10
 importFrom(graphics, matplot, title)
6 11
 importFrom(grDevices, dev.new, dev.off, pdf)
7 12
 importFrom(methods, is)
8
-importFrom(rjags, jags.model, load.module, jags.samples)  
9 13
 importFrom(stats, heatmap, runif)
10 14
 importFrom(utils, read.table, write.table)
15
+S3method(coef, jags)
16
+S3method(update, jags)
17
+S3method(variable.names, jags)
... ...
@@ -1,2 +1,3 @@
1
-CoGAPS requires GAPS-JAGS available from http://www.cancerbiostats.onc.jhmi.edu/cogaps.cfm.  This c++ package is a redistribution of JAGS version 2.1.0 with a module implementing the GAPS matrix decomposition for microarray data.  GAPS-JAGS takes the place of the original JAGS package required for the successful installation and running of the rjags package. Please see the installation instructions in the users manual.  If you have any questions, please comment Elana Fertig <ejfertig@jhmi.edu> or Michael Ochs <mfo@jhu.edu>.
1
+CoGAPS requires GAPS-JAGS available from http://www.cancerbiostats.onc.jhmi.edu/cogaps.cfm.  This c++ package is a redistribution of JAGS version 2.1.0 with a module implementing the GAPS matrix decomposition for microarray data.  Please see the installation instructions in the users manual.  If you have any questions, please comment Elana Fertig <ejfertig@jhmi.edu> or Michael Ochs <mfo@jhu.edu>.
2 2
 
3
+01Sep2011 - Removed dependency on rjags package on CRAN
... ...
@@ -5,9 +5,6 @@ RunGAPS <- function(data, unc, numPatterns,
5 5
                     SAIter, iter, thin=1) {
6 6
 
7 7
 
8
-  # load in the matrix decomposition module
9
-  load.module(c("gaps"))
10
-
11 8
   # get the data needed for MCMC
12 9
   matrixDecompData <- GetDataListGAPS(data, unc, numPatterns,
13 10
                                       MaxAtomsA, alphaA, lambdaA,
14 11
new file mode 100644
... ...
@@ -0,0 +1,362 @@
1
+jags.model <- function(file, data=sys.frame(sys.parent()), inits,
2
+                       n.chains = 1, n.adapt=1000, nchain)
3
+{
4
+
5
+    if (missing(file)) {
6
+        stop("Model file name missing")
7
+    }
8
+    if (!file.exists(file)) {
9
+        stop(paste("Model file \"", file, "\" not found", sep=""))
10
+    }
11
+    if (!missing(nchain)) {
12
+        warning("Argument nchain in jags.model is deprecated. Use n.chains.")
13
+        if (missing(n.chains)) {
14
+            n.chains = nchain
15
+        }
16
+    }
17
+    
18
+    p <- .Call("make_console", PACKAGE="CoGAPS") 
19
+    .Call("check_model", p, file, PACKAGE="CoGAPS")
20
+
21
+    varnames <- .Call("get_variable_names", p, PACKAGE="CoGAPS")
22
+    if (is.environment(data)) {
23
+        ##Get a list of numeric objects from the supplied environment
24
+        data <- mget(varnames, envir=data, mode="numeric",
25
+                     ifnotfound=list(NULL))
26
+        ##Strip null entries
27
+        data <- data[!sapply(data, is.null)]
28
+    }
29
+    else if (is.list(data)) {
30
+        v <- names(data)
31
+        if (is.null(v)) {
32
+            stop("data must be a named list")
33
+        }
34
+        if (any(nchar(v)==0)) {
35
+            stop("unnamed variables in data list")
36
+        }
37
+        if (any(duplicated(v))) {
38
+            stop("Duplicated names in data list: ",
39
+                 paste(v[duplicated(v)], collapse=" "))
40
+        }
41
+        relevant.variables <- v %in% varnames
42
+        data <- data[relevant.variables]
43
+        unused.variables <- setdiff(v, varnames)
44
+        for (i in seq(along=unused.variables)) {
45
+            warning("Unused variable \"", unused.variables[i], "\" in data")
46
+        }
47
+    }
48
+    else {
49
+        stop("data must be a list or environment")
50
+    }
51
+    
52
+    .Call("compile", p, data, as.integer(n.chains), TRUE, PACKAGE="CoGAPS")
53
+
54
+### Setting initial values
55
+
56
+    if (!missing(inits)) {
57
+
58
+        checkParameters <- function(inits) {
59
+            if(!is.list(inits))
60
+                return (FALSE)
61
+
62
+            inames <- names(inits)
63
+            if (is.null(inames) || any(nchar(inames) == 0))
64
+                return (FALSE)
65
+
66
+            if (any(duplicated(inames)))
67
+                return (FALSE)
68
+            
69
+            if (any(inames==".RNG.name")) {
70
+                rngname <- inits[[".RNG.name"]]
71
+                if (!is.character(rngname) || length(rngname) != 1)
72
+                    return (FALSE)
73
+                inits[[".RNG.name"]] <- NULL
74
+            }
75
+
76
+            if (!all(sapply(inits, is.numeric)))
77
+                return (FALSE)
78
+            
79
+            return (TRUE)
80
+        }
81
+        
82
+        setParameters <- function(inits, chain) {
83
+            if (!is.null(inits[[".RNG.name"]])) {
84
+                .Call("set_rng_name", p, inits[[".RNG.name"]],
85
+                      as.integer(chain), PACKAGE="CoGAPS")
86
+                inits[[".RNG.name"]] <- NULL
87
+            }
88
+            .Call("set_parameters", p, inits, as.integer(chain),
89
+                  PACKAGE="CoGAPS")
90
+        }
91
+        
92
+        init.values <- vector("list", n.chains)
93
+        
94
+        if (is.function(inits)) {
95
+            if (any(names(formals(inits)) == "chain")) {
96
+                for (i in 1:n.chains) {
97
+                    init.values[[i]] <- inits(chain=i)
98
+                }
99
+            }
100
+            else {
101
+                for (i in 1:n.chains) {
102
+                    init.values[[i]] <- inits()
103
+                }
104
+            }
105
+        }
106
+        else if (is.list(inits)) {
107
+
108
+            if (checkParameters(inits)) {
109
+                ## Replicate initial values for all chains
110
+                for (i in 1:n.chains) {
111
+                    init.values[[i]] <- inits
112
+                }
113
+            }
114
+            else {
115
+                if (length(inits) != n.chains) {
116
+                    stop("Length mismatch in inits")
117
+                }
118
+                init.values <- inits
119
+            }
120
+        }
121
+            
122
+        for (i in 1:n.chains) {
123
+            if (!checkParameters(init.values[[i]])) {
124
+                stop("Invalid parameters for chain ", i)
125
+            }
126
+            setParameters(init.values[[i]], i)
127
+        }
128
+    }
129
+
130
+    .Call("initialize", p, PACKAGE="CoGAPS")
131
+
132
+    model.state <- .Call("get_state", p, PACKAGE="CoGAPS")
133
+    model.data <- .Call("get_data", p, PACKAGE="CoGAPS")
134
+    model.code <- readLines(file, warn=FALSE)
135
+    model <- list("ptr" = function() {p},
136
+                  "data" = function() {model.data},
137
+                  "model" = function() {model.code},
138
+                  "state" = function(internal=FALSE)
139
+                  {
140
+                      if(!internal) {
141
+                          for(i in 1:n.chains) {
142
+                              model.state[[i]][[".RNG.state"]] <- NULL
143
+                              model.state[[i]][[".RNG.name"]] <- NULL
144
+                          }
145
+                      }
146
+                      return(model.state)
147
+                  },
148
+                  "nchain" = function()
149
+                  {
150
+                      .Call("get_nchain", p, PACKAGE="CoGAPS")
151
+                  },
152
+                  "iter" = function()
153
+                  {
154
+                      .Call("get_iter", p, PACKAGE="CoGAPS")
155
+                  },
156
+                  "sync" = function() {
157
+                      
158
+                      model.state <<- .Call("get_state", p, PACKAGE="CoGAPS")
159
+                  },
160
+                  "recompile" = function() {
161
+                      ## Clear the console
162
+                      .Call("clear_console", p, PACKAGE="CoGAPS")
163
+                      p <<- .Call("make_console", PACKAGE="CoGAPS")
164
+                      ## Write the model to a temporary file so we can re-read it
165
+                      mf <- tempfile()
166
+                      writeLines(model.code, mf)
167
+                      .Call("check_model", p, mf, PACKAGE="CoGAPS")
168
+                      unlink(mf)
169
+                      ## Re-compile
170
+                      .Call("compile", p, data, n.chains, FALSE, PACKAGE="CoGAPS")
171
+                      ## Re-initialize
172
+                      if (!is.null(model.state)) {
173
+                          if (length(model.state) != n.chains) {
174
+                              stop("Incorrect number of chains in saved state")
175
+                          }
176
+                          for (i in 1:n.chains) {
177
+                              statei <- model.state[[i]]
178
+                              rng <- statei[[".RNG.name"]]
179
+                              if (!is.null(rng)) {
180
+                                  .Call("set_rng_name", p, rng, i, PACKAGE="CoGAPS")
181
+                                  statei[[".RNG.name"]] <- NULL
182
+                              }
183
+                              .Call("set_parameters", p, statei, i, PACKAGE="CoGAPS")
184
+                          }
185
+                          .Call("initialize", p, PACKAGE="CoGAPS")
186
+                          ## Redo adaptation
187
+                          adapting <- .Call("is_adapting", p, PACKAGE="CoGAPS")
188
+                          if(n.adapt > 0 && adapting) {
189
+                              cat("Adapting\n")
190
+                              .Call("update", p, n.adapt, PACKAGE="CoGAPS")
191
+                              if (!.Call("adapt_off", p, PACKAGE="CoGAPS")) {
192
+                                  warning("Adaptation incomplete");
193
+                              }
194
+                          }
195
+                          model.state <<- .Call("get_state", p, PACKAGE="CoGAPS")
196
+                      }
197
+                      invisible(NULL)
198
+                  })
199
+    class(model) <- "jags"
200
+
201
+    if (n.adapt > 0) {
202
+        adapt(model, n.adapt)
203
+    }
204
+    return(model)
205
+}
206
+
207
+parse.varname <- function(varname) {
208
+
209
+  ## Try to parse string of form "a" or "a[n,p:q,r]" where "a" is a
210
+  ## variable name and n,p,q,r are integers
211
+
212
+  v <- try(parse(text=varname, n=1), silent=TRUE)
213
+  if (!is.expression(v) || length(v) != 1)
214
+    return(NULL)
215
+
216
+  v <- v[[1]]
217
+  if (is.name(v)) {
218
+    ##Full node array requested
219
+    return(list(name=deparse(v)))
220
+  }
221
+  else if (is.call(v) && identical(deparse(v[[1]]), "[") && length(v) > 2) {
222
+    ##Subset requested
223
+    ndim <- length(v) - 2
224
+    lower <- upper <- numeric(ndim)
225
+    if (any(nchar(sapply(v, deparse)) == 0)) {
226
+      ##We have to catch empty indices here or they will cause trouble
227
+      ##below
228
+      return(NULL)
229
+    }
230
+    for (i in 1:ndim) {
231
+      index <- v[[i+2]]
232
+      if (is.numeric(index)) {
233
+        ##Single index
234
+        lower[i] <- upper[i] <- index
235
+      }
236
+      else if (is.call(index) && length(index) == 3 &&
237
+               identical(deparse(index[[1]]), ":") &&
238
+               is.numeric(index[[2]]) && is.numeric(index[[3]]))
239
+        {
240
+          ##Index range
241
+          lower[i] <- index[[2]]
242
+          upper[i] <- index[[3]]
243
+        }
244
+      else return(NULL)
245
+    }
246
+    if (any(upper < lower))
247
+      return (NULL)
248
+    return(list(name = deparse(v[[2]]), lower=lower, upper=upper))
249
+  }
250
+  return(NULL)
251
+}
252
+
253
+parse.varnames <- function(varnames)
254
+{
255
+  names <- character(length(varnames))
256
+  lower <- upper <- vector("list", length(varnames))
257
+  for (i in seq(along=varnames)) {
258
+    y <- parse.varname(varnames[i])
259
+    if (is.null(y)) {
260
+      stop(paste("Invalid variable subset", varnames[i]))
261
+    }
262
+    names[i] <- y$name
263
+    if (!is.null(y$lower)) {
264
+      lower[[i]] <- y$lower
265
+    }
266
+    if (!is.null(y$upper)) {
267
+      upper[[i]] <- y$upper
268
+    }
269
+  }
270
+  return(list(names=names, lower=lower, upper=upper))
271
+}
272
+
273
+
274
+jags.samples <-
275
+  function(model, variable.names, n.iter, thin=1, type="trace", ...)
276
+{
277
+    if (class(model) != "jags")
278
+      stop("Invalid JAGS model")
279
+
280
+    if (!is.character(variable.names) || length(variable.names) == 0)
281
+      stop("variable.names must be a character vector")
282
+     
283
+    if (!is.numeric(n.iter) || length(n.iter) != 1 || n.iter <= 0)
284
+      stop("n.iter must be a positive integer")
285
+    if (!is.character(type))
286
+      stop("type must be a character vector")
287
+
288
+    pn <- parse.varnames(variable.names)
289
+    .Call("set_monitors", model$ptr(), pn$names, pn$lower, pn$upper,
290
+          as.integer(thin), type, PACKAGE="CoGAPS")
291
+    update(model, n.iter, ...)
292
+    ans <- .Call("get_monitored_values", model$ptr(), type, PACKAGE="CoGAPS")
293
+    for (i in seq(along=variable.names)) {
294
+      .Call("clear_monitor", model$ptr(), pn$names[i], pn$lower[[i]],
295
+            pn$upper[[i]], type, PACKAGE="CoGAPS")
296
+    }
297
+    return(ans)
298
+}
299
+
300
+nchain <- function(model)
301
+{
302
+    if (!inherits(model, "jags"))
303
+      stop("Invalid JAGS model object in nchain")
304
+    
305
+    .Call("get_nchain", model$ptr(), PACKAGE="CoGAPS")
306
+}
307
+
308
+load.module <- function(name, path, quiet=FALSE)
309
+{
310
+    if (name %in% list.modules()) {
311
+        ## This is a stop-gap measure as JAGS 2.1.0 does allow you
312
+        ## to load the same module twice. This should be fixed in
313
+        ## later versions.
314
+        return(invisible()) #Module already loaded
315
+    }
316
+    
317
+    if (missing(path)) {
318
+        path = getOption("jags.moddir")
319
+        if (is.null(path)) {
320
+            stop("option jags.moddir is not set")
321
+        }
322
+    }
323
+    if (!is.character(path) || length(path) != 1)
324
+        stop("invalid path")
325
+    if (!is.character(name) || length(name) != 1)
326
+        stop("invalid name")
327
+
328
+    file <- file.path(path, paste(name, .Platform$dynlib.ext, sep=""))
329
+    if (!file.exists(file)) {
330
+        stop("File not found: ", file)
331
+    }
332
+    if (!isDLLLoaded(file)) {
333
+        ## We must avoid calling dyn.load twice on the same DLL This
334
+        ## may result in the DLL being unloaded and then reloaded,
335
+        ## which will invalidate pointers to the distributions,
336
+        ## functions and factories in the module.
337
+        dyn.load(file)
338
+    }
339
+    ok <- .Call("load_module", name, PACKAGE="CoGAPS")
340
+    if (!ok) {
341
+        stop("module", name, "not found\n", sep=" ")
342
+    }
343
+    else if (!quiet) {
344
+        cat("module", name, "loaded\n", sep=" ")
345
+    }
346
+    invisible()
347
+}
348
+
349
+list.modules <- function()
350
+{
351
+    .Call("get_modules", PACKAGE="CoGAPS");
352
+}
353
+
354
+isDLLLoaded <- function(file)
355
+{
356
+    dll.list <- getLoadedDLLs()
357
+    for (i in seq(along=dll.list)) {
358
+        if (dll.list[[i]]["path"][1] == file)
359
+            return(TRUE)
360
+    }
361
+    return(FALSE)
362
+}
0 363
new file mode 100644
... ...
@@ -0,0 +1,89 @@
1
+update.jags <- function(object, n.iter = 1, by, progress.bar, ...)
2
+{
3
+    if (!is.numeric(n.iter) || n.iter < 1) {
4
+        stop("Invalid n.iter")
5
+    }
6
+
7
+    if ("update" %in% names(object)) {
8
+        ## Old-style jags.model object
9
+        ## The progress bar was created by the object$update() function
10
+        
11
+        if (missing(by))
12
+            by <- floor(n.iter/50)
13
+
14
+        object$update(n.iter, by)
15
+    }
16
+    else {
17
+        ## New jags.model object (in version 1.0.3-6)
18
+
19
+        adapting <- .Call("is_adapting", object$ptr(), PACKAGE="CoGAPS") 
20
+        on.exit(object$sync())
21
+        
22
+        if (missing(progress.bar)) {
23
+            progress.bar <- getOption("jags.pb")
24
+        }
25
+        if (!is.null(progress.bar)) {
26
+            match.arg(progress.bar, c("text","gui","none"))
27
+            if (progress.bar=="none")
28
+                progress.bar <- NULL
29
+        }
30
+        
31
+        do.pb <- interactive() && !is.null(progress.bar) && n.iter >= 100
32
+        if (do.pb) {
33
+            start.iter <- object$iter()
34
+            end.iter <- start.iter + n.iter
35
+            pb <- switch(progress.bar,
36
+                         "text" = txtProgressBar(start.iter, end.iter,
37
+                         initial = start.iter, style=3, width=50, 
38
+                         char=ifelse(adapting,"+","*")),
39
+                         "gui" = updatePB(start.iter, end.iter, adapting))
40
+        }
41
+        
42
+        ## Set refresh frequency for progress bar
43
+        if (missing(by) || by <= 0) {
44
+            by <- min(ceiling(n.iter/50), 100)
45
+        }
46
+        else {
47
+            by <- ceiling(by)
48
+        }
49
+
50
+        ## Do updates
51
+        n <- n.iter
52
+        while (n > 0) {
53
+            .Call("update", object$ptr(), min(n,by), PACKAGE="CoGAPS")
54
+            if (do.pb) {
55
+                switch(progress.bar,
56
+                       "text" = setTxtProgressBar(pb, object$iter()),
57
+                       "gui" =  setPB(pb, object$iter()))
58
+            }
59
+            n <- n - by
60
+        }
61
+        if (do.pb) {
62
+            close(pb)
63
+        }
64
+    }
65
+
66
+    invisible(NULL)
67
+}
68
+
69
+adapt <- function(object, n.iter, ...)
70
+{
71
+    if(.Call("is_adapting", object$ptr(), PACKAGE="CoGAPS")) {
72
+        update(object, n.iter, ...)
73
+        if (!.Call("adapt_off", object$ptr(), PACKAGE="CoGAPS")) {
74
+            warning("Adaptation incomplete. Recreate the model with a longer adaptive phase.")
75
+        }
76
+    }
77
+    invisible(NULL)
78
+}
79
+                  
80
+coef.jags <- function(object, chain = 1, ...) {
81
+    if (!is.numeric(chain) || chain < 1 || chain > object$nchain()) {
82
+        stop("Invalid chain")
83
+    }
84
+    object$state(internal=FALSE)[[chain]]
85
+}
86
+
87
+variable.names.jags <- function(object, ...) {
88
+    .Call("get_variable_names", object$ptr(), PACKAGE="CoGAPS")
89
+}
0 90
new file mode 100644
... ...
@@ -0,0 +1,26 @@
1
+read.data <- function(file, format=c("jags","bugs"))
2
+{
3
+    format <- match.arg(format)
4
+    switch(format, "jags"=read.jagsdata(file), "bugs"=read.bugsdata(file))
5
+}
6
+
7
+read.jagsdata <- function(file)
8
+{
9
+  e <- new.env()
10
+  eval(parse(file), e)
11
+  return(as.list(e))
12
+}
13
+
14
+read.bugsdata <- function(file)
15
+{
16
+    bugs.dat <- dget(file)
17
+    for (n in names(bugs.dat)) {
18
+        if (!is.null(dim(bugs.dat[[n]]))) {
19
+            dim(bugs.dat[[n]]) <- rev(dim(bugs.dat[[n]]))
20
+            bugs.dat[[n]] <- aperm(bugs.dat[[n]])
21
+        }
22
+    }
23
+    return(bugs.dat)
24
+}
25
+    
26
+
0 27
new file mode 100644
... ...
@@ -0,0 +1,11 @@
1
+updatePB <- function(start.iter, end.iter, adapting)
2
+{
3
+  tcltk:::tkProgressBar(title=ifelse(adapting, "Adapting","Updating"),
4
+                        label="Iteration 0", min = start.iter, max=end.iter,
5
+                        initial=start.iter)
6
+}
7
+
8
+setPB <- function(pb, iter)
9
+{
10
+  tcltk:::setTkProgressBar(pb, iter, label=paste("Iteration",iter))
11
+}
0 12
new file mode 100644
... ...
@@ -0,0 +1,20 @@
1
+.onLoad <- function(lib, pkg)
2
+{
3
+  ## Load the rjags wrapper ...
4
+  library.dynam("CoGAPS", pkg, lib, local=FALSE)
5
+
6
+  ## ... and the modules
7
+  moddir <- "/usr/local/lib/JAGS/modules-1.0.2"
8
+  if (is.null(getOption("jags.moddir"))) {
9
+      options("jags.moddir" = moddir)
10
+  }
11
+  load.module("basemod")
12
+  load.module("gaps")
13
+
14
+  .Call("init_jags_console", PACKAGE="CoGAPS")
15
+
16
+  ## Set progress bar type
17
+  if (is.null(getOption("jags.pb"))) {
18
+      options("jags.pb"="text")
19
+  }
20
+}
0 21
new file mode 100644
... ...
@@ -0,0 +1,20 @@
1
+.onLoad <- function(lib, pkg)
2
+{
3
+  ## Load the rjags wrapper ...
4
+  library.dynam("CoGAPS", pkg, lib, local=FALSE)
5
+
6
+  ## ... and the modules
7
+  moddir <- "@JAGS_MODULES@"
8
+  if (is.null(getOption("jags.moddir"))) {
9
+      options("jags.moddir" = moddir)
10
+  }
11
+  load.module("basemod")
12
+  load.module("gaps")
13
+
14
+  .Call("init_jags_console", PACKAGE="CoGAPS")
15
+
16
+  ## Set progress bar type
17
+  if (is.null(getOption("jags.pb"))) {
18
+      options("jags.pb"="text")
19
+  }
20
+}
0 21
new file mode 100644
... ...
@@ -0,0 +1,11 @@
1
+updatePB <- function(start.iter, end.iter, adapting)
2
+{
3
+    winProgressBar(title=ifelse(adapting, "Adapting","Updating"),
4
+                  label="Iteration 0", min = start.iter, max=end.iter,
5
+                  initial=start.iter)
6
+}
7
+
8
+setPB <- function(pb, iter)
9
+{
10
+    setWinProgressBar(pb, iter, label=paste("Iteration",iter))
11
+}
0 12
new file mode 100644
... ...
@@ -0,0 +1,54 @@
1
+.onLoad <- function(lib, pkg)
2
+{
3
+### First task is to get installation directory of JAGS
4
+
5
+    ## Try environment variable first
6
+    jags.home <- Sys.getenv("JAGS_HOME")
7
+    if (nchar(jags.home)==0) {
8
+        keyname <- "SOFTWARE\\JAGS\\JAGS-2.1.0"
9
+        if (identical(.Platform$r_arch, "x64")) {
10
+            keyname <- paste(keyname,"-x64", sep="")
11
+        }
12
+        ## Look for multi-user installation in registry
13
+        regkey <- try(readRegistry(keyname, hive = "HLM", maxdepth = 1),
14
+                      silent = TRUE)
15
+        if (inherits(regkey, "try-error")) {
16
+            ## Look for single-user installation in registry
17
+            regkey <- try(readRegistry(keyname, hive = "HCU", maxdepth = 1),
18
+                          silent = TRUE)
19
+        }
20
+        if (inherits(regkey, "try-error") || is.null(regkey[["InstallDir"]])) {
21
+            ## Give up
22
+            stop("Failed to locate JAGS 2.1.0 installation.")
23
+        }
24
+        jags.home <- regkey[["InstallDir"]]
25
+    }
26
+
27
+    
28
+### Add jags.home to the windows PATH, if not already present
29
+
30
+    bindir <- file.path(jags.home, "bin")
31
+    path <- Sys.getenv("PATH")
32
+    split.path <- strsplit(path, .Platform$path.sep)$PATH
33
+    if (!any(split.path == bindir)) {
34
+        path <- paste(bindir, path, sep=.Platform$path.sep)
35
+        Sys.setenv("PATH"=path)
36
+    }
37
+    
38
+### Set the module directory, if the option jags.moddir is not already set
39
+    
40
+    if (is.null(getOption("jags.moddir"))) {
41
+        options("jags.moddir" = file.path(jags.home, "modules"))
42
+    }
43
+    library.dynam("CoGAPS", pkg, lib, local=FALSE)
44
+    load.module("basemod")
45
+    load.module("gaps")
46
+    
47
+    .Call("init_jags_console", PACKAGE="CoGAPS")
48
+
49
+### Set progress bar type
50
+    
51
+    if (is.null(getOption("jags.pb"))) {
52
+        options("jags.pb"="text")
53
+    }
54
+}
0 55
new file mode 100644
... ...
@@ -0,0 +1,163 @@
1
+# generated automatically by aclocal 1.10 -*- Autoconf -*-
2
+
3
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
+# 2005, 2006  Free Software Foundation, Inc.
5
+# This file is free software; the Free Software Foundation
6
+# gives unlimited permission to copy and/or distribute it,
7
+# with or without modifications, as long as this notice is preserved.
8
+
9
+# This program is distributed in the hope that it will be useful,
10
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
+# PARTICULAR PURPOSE.
13
+
14
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
15
+# 
16
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
17
+#
18
+# This program is free software; you can redistribute it and/or modify
19
+# it under the terms of the GNU General Public License as published by
20
+# the Free Software Foundation; either version 2 of the License, or
21
+# (at your option) any later version.
22
+#
23
+# This program is distributed in the hope that it will be useful, but
24
+# WITHOUT ANY WARRANTY; without even the implied warranty of
25
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26
+# General Public License for more details.
27
+#
28
+# You should have received a copy of the GNU General Public License
29
+# along with this program; if not, write to the Free Software
30
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31
+#
32
+# As a special exception to the GNU General Public License, if you
33
+# distribute this file as part of a program that contains a
34
+# configuration script generated by Autoconf, you may include it under
35
+# the same distribution terms that you use for the rest of that program.
36
+
37
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
38
+# ----------------------------------
39
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
40
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
41
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
42
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
43
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
44
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
45
+fi
46
+if test -n "$PKG_CONFIG"; then
47
+	_pkg_min_version=m4_default([$1], [0.9.0])
48
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
49
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
50
+		AC_MSG_RESULT([yes])
51
+	else
52
+		AC_MSG_RESULT([no])
53
+		PKG_CONFIG=""
54
+	fi
55
+		
56
+fi[]dnl
57
+])# PKG_PROG_PKG_CONFIG
58
+
59
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
60
+#
61
+# Check to see whether a particular set of modules exists.  Similar
62
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
63
+#
64
+#
65
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
66
+# this or PKG_CHECK_MODULES is called, or make sure to call
67
+# PKG_CHECK_EXISTS manually
68
+# --------------------------------------------------------------
69
+AC_DEFUN([PKG_CHECK_EXISTS],
70
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
71
+if test -n "$PKG_CONFIG" && \
72
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
73
+  m4_ifval([$2], [$2], [:])
74
+m4_ifvaln([$3], [else
75
+  $3])dnl
76
+fi])
77
+
78
+
79
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
80
+# ---------------------------------------------
81
+m4_define([_PKG_CONFIG],
82
+[if test -n "$PKG_CONFIG"; then
83
+    if test -n "$$1"; then
84
+        pkg_cv_[]$1="$$1"
85
+    else
86
+        PKG_CHECK_EXISTS([$3],
87
+                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
88
+			 [pkg_failed=yes])
89
+    fi
90
+else
91
+	pkg_failed=untried
92
+fi[]dnl
93
+])# _PKG_CONFIG
94
+
95
+# _PKG_SHORT_ERRORS_SUPPORTED
96
+# -----------------------------
97
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
98
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
99
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
100
+        _pkg_short_errors_supported=yes
101
+else
102
+        _pkg_short_errors_supported=no
103
+fi[]dnl
104
+])# _PKG_SHORT_ERRORS_SUPPORTED
105
+
106
+
107
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
108
+# [ACTION-IF-NOT-FOUND])
109
+#
110
+#
111
+# Note that if there is a possibility the first call to
112
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
113
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
114
+#
115
+#
116
+# --------------------------------------------------------------
117
+AC_DEFUN([PKG_CHECK_MODULES],
118
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
119
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
120
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
121
+
122
+pkg_failed=no
123
+AC_MSG_CHECKING([for $1])
124
+
125
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
126
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
127
+
128
+if test $pkg_failed = yes; then
129
+        _PKG_SHORT_ERRORS_SUPPORTED
130
+        if test $_pkg_short_errors_supported = yes; then
131
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
132
+        else 
133
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
134
+        fi
135
+	# Put the nasty error message in config.log where it belongs
136
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
137
+
138
+	ifelse([$4], , [AC_MSG_ERROR(dnl
139
+[Package requirements ($2) were not met:
140
+
141
+$$1_PKG_ERRORS
142
+
143
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
144
+installed software in a non-standard prefix.
145
+])],
146
+		[AC_MSG_RESULT([no])
147
+                $4])
148
+elif test $pkg_failed = untried; then
149
+	ifelse([$4], , [AC_MSG_FAILURE(dnl
150
+[The pkg-config script could not be found or is too old.  Make sure it
151
+is in your PATH or set the PKG_CONFIG environment variable to the full
152
+path to pkg-config.
153
+
154
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
155
+		[$4])
156
+else
157
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
158
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
159
+        AC_MSG_RESULT([yes])
160
+	ifelse([$3], , :, [$3])
161
+fi[]dnl
162
+])# PKG_CHECK_MODULES
163
+
0 164
new file mode 100755
... ...
@@ -0,0 +1,3 @@
1
+#!/bin/sh
2
+rm -f src/Makevars
3
+rm -f R/unix/zzz.R
0 4
new file mode 100644
... ...
@@ -0,0 +1,408 @@
1
+This file contains any messages produced by compilers while
2
+running configure, to aid debugging if configure makes a mistake.
3
+
4
+It was created by CoGAPS configure 2.1.0, which was
5
+generated by GNU Autoconf 2.63.  Invocation command line was
6
+
7
+  $ ./configure --with-jags-include=/usr/local/include/GAPS-JAGS --with-jags-lib=/usr/local/lib --with-jags-modules=/usr/local/lib/JAGS/modules-1.0.2
8
+
9
+## --------- ##
10
+## Platform. ##
11
+## --------- ##
12
+
13
+hostname = Elana-Fertigs-Mac-Pro.local
14
+uname -m = x86_64
15
+uname -r = 10.8.0
16
+uname -s = Darwin
17
+uname -v = Darwin Kernel Version 10.8.0: Tue Jun  7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64
18
+
19
+/usr/bin/uname -p = i386
20
+/bin/uname -X     = unknown
21
+
22
+/bin/arch              = unknown
23
+/usr/bin/arch -k       = unknown
24
+/usr/convex/getsysinfo = unknown
25
+/usr/bin/hostinfo      = Mach kernel version:
26
+	 Darwin Kernel Version 10.8.0: Tue Jun  7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64
27
+Kernel configured for up to 8 processors.
28
+4 processors are physically available.
29
+8 processors are logically available.
30
+Processor type: i486 (Intel 80486)
31
+Processors active: 0 1 2 3 4 5 6 7
32
+Primary memory available: 16.00 gigabytes
33
+Default processor set: 83 tasks, 317 threads, 8 processors
34
+Load average: 2.67, Mach factor: 5.32
35
+/bin/machine           = unknown
36
+/usr/bin/oslevel       = unknown
37
+/bin/universe          = unknown
38
+
39
+PATH: /Users/ejfertig/Documents/SupportScripts
40
+PATH: /opt/local/bin
41
+PATH: /opt/local/sbin
42
+PATH: /Users/ejfertig/Documents/SupportScripts
43
+PATH: /opt/local/bin
44
+PATH: /opt/local/sbin
45
+PATH: /usr/bin
46
+PATH: /bin
47
+PATH: /usr/sbin
48
+PATH: /sbin
49
+PATH: /usr/local/bin
50
+PATH: /usr/texbin
51
+PATH: /usr/X11/bin
52
+PATH: /Applications/MATLAB_R2010b.app/bin/
53
+PATH: /Applications/MATLAB_R2010b.app/bin/
54
+
55
+
56
+## ----------- ##
57
+## Core tests. ##
58
+## ----------- ##
59
+
60
+configure:1803: checking for jags
61
+configure:1821: found /usr/local/bin/jags
62
+configure:1833: result: /usr/local/bin/jags
63
+configure:1981: checking for g++
64
+configure:1997: found /usr/bin/g++
65
+configure:2008: result: g++
66
+configure:2035: checking for C++ compiler version
67
+configure:2043: g++ --version >&5
68
+i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
69
+Copyright (C) 2007 Free Software Foundation, Inc.
70
+This is free software; see the source for copying conditions.  There is NO
71
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
72
+
73
+configure:2047: $? = 0
74
+configure:2054: g++ -v >&5
75
+Using built-in specs.
76
+Target: i686-apple-darwin10
77
+Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
78
+Thread model: posix
79
+gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
80
+configure:2058: $? = 0
81
+configure:2065: g++ -V >&5
82
+g++-4.2: argument to `-V' is missing
83
+configure:2069: $? = 1
84
+configure:2092: checking for C++ compiler default output file name
85
+configure:2114: g++  -I/usr/local/include/GAPS-JAGS  conftest.cpp  >&5
86
+configure:2118: $? = 0
87
+configure:2156: result: a.out
88
+configure:2175: checking whether the C++ compiler works
89
+configure:2185: ./a.out
90
+configure:2189: $? = 0
91
+configure:2208: result: yes
92
+configure:2215: checking whether we are cross compiling
93
+configure:2217: result: no
94
+configure:2220: checking for suffix of executables
95
+configure:2227: g++ -o conftest  -I/usr/local/include/GAPS-JAGS  conftest.cpp  >&5
96
+configure:2231: $? = 0
97
+configure:2257: result: 
98
+configure:2263: checking for suffix of object files
99
+configure:2289: g++ -c  -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
100
+configure:2293: $? = 0
101
+configure:2318: result: o
102
+configure:2322: checking whether we are using the GNU C++ compiler
103
+configure:2351: g++ -c  -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
104
+configure:2358: $? = 0
105
+configure:2375: result: yes
106
+configure:2384: checking whether g++ accepts -g
107
+configure:2414: g++ -c -g -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
108
+configure:2421: $? = 0
109
+configure:2522: result: yes
110
+configure:2551: checking how to run the C++ preprocessor
111
+configure:2587: g++ -E -I/usr/local/include/GAPS-JAGS conftest.cpp
112
+configure:2594: $? = 0
113
+configure:2625: g++ -E -I/usr/local/include/GAPS-JAGS conftest.cpp
114
+conftest.cpp:8:28: error: ac_nonexistent.h: No such file or directory
115
+configure:2632: $? = 1
116
+configure: failed program was:
117
+| /* confdefs.h.  */
118
+| #define PACKAGE_NAME "CoGAPS"
119
+| #define PACKAGE_TARNAME "CoGAPS"
120
+| #define PACKAGE_VERSION "2.1.0"
121
+| #define PACKAGE_STRING "CoGAPS 2.1.0"
122
+| #define PACKAGE_BUGREPORT ""
123
+| /* end confdefs.h.  */
124
+| #include <ac_nonexistent.h>
125
+configure:2665: result: g++ -E
126
+configure:2694: g++ -E -I/usr/local/include/GAPS-JAGS conftest.cpp
127
+configure:2701: $? = 0
128
+configure:2732: g++ -E -I/usr/local/include/GAPS-JAGS conftest.cpp
129
+conftest.cpp:8:28: error: ac_nonexistent.h: No such file or directory
130
+configure:2739: $? = 1
131
+configure: failed program was:
132
+| /* confdefs.h.  */
133
+| #define PACKAGE_NAME "CoGAPS"
134
+| #define PACKAGE_TARNAME "CoGAPS"
135
+| #define PACKAGE_VERSION "2.1.0"
136
+| #define PACKAGE_STRING "CoGAPS 2.1.0"
137
+| #define PACKAGE_BUGREPORT ""
138
+| /* end confdefs.h.  */
139
+| #include <ac_nonexistent.h>
140
+configure:2779: checking for grep that handles long lines and -e
141
+configure:2839: result: /usr/bin/grep
142
+configure:2844: checking for egrep
143
+configure:2908: result: /usr/bin/grep -E
144
+configure:2913: checking for ANSI C header files
145
+configure:2943: g++ -c -g -O2 -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
146
+configure:2950: $? = 0
147
+configure:3049: g++ -o conftest -g -O2 -I/usr/local/include/GAPS-JAGS  conftest.cpp  >&5
148
+configure:3053: $? = 0
149
+configure:3059: ./conftest
150
+configure:3063: $? = 0
151
+configure:3081: result: yes
152
+configure:3105: checking for sys/types.h
153
+configure:3126: g++ -c -g -O2 -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
154
+configure:3133: $? = 0
155
+configure:3150: result: yes
156
+configure:3105: checking for sys/stat.h
157
+configure:3126: g++ -c -g -O2 -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
158
+configure:3133: $? = 0
159
+configure:3150: result: yes
160
+configure:3105: checking for stdlib.h
161
+configure:3126: g++ -c -g -O2 -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
162
+configure:3133: $? = 0
163
+configure:3150: result: yes
164
+configure:3105: checking for string.h
165
+configure:3126: g++ -c -g -O2 -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
166
+configure:3133: $? = 0
167
+configure:3150: result: yes
168
+configure:3105: checking for memory.h
169
+configure:3126: g++ -c -g -O2 -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
170
+configure:3133: $? = 0
171
+configure:3150: result: yes
172
+configure:3105: checking for strings.h
173
+configure:3126: g++ -c -g -O2 -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
174
+configure:3133: $? = 0
175
+configure:3150: result: yes
176
+configure:3105: checking for inttypes.h
177
+configure:3126: g++ -c -g -O2 -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
178
+configure:3133: $? = 0
179
+configure:3150: result: yes
180
+configure:3105: checking for stdint.h
181
+configure:3126: g++ -c -g -O2 -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
182
+configure:3133: $? = 0
183
+configure:3150: result: yes
184
+configure:3105: checking for unistd.h
185
+configure:3126: g++ -c -g -O2 -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
186
+configure:3133: $? = 0
187
+configure:3150: result: yes
188
+configure:3174: checking Console.h usability
189
+configure:3191: g++ -c -g -O2 -I/usr/local/include/GAPS-JAGS conftest.cpp >&5
190
+configure:3198: $? = 0
191
+configure:3212: result: yes
192
+configure:3216: checking Console.h presence
193
+configure:3231: g++ -E -I/usr/local/include/GAPS-JAGS conftest.cpp
194
+configure:3238: $? = 0
195
+configure:3252: result: yes
196
+configure:3280: checking for Console.h
197
+configure:3287: result: yes
198
+configure:3411: checking for gcc
199
+configure:3427: found /usr/bin/gcc
200
+configure:3438: result: gcc
201
+configure:3670: checking for C compiler version
202
+configure:3678: gcc --version >&5
203
+i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
204
+Copyright (C) 2007 Free Software Foundation, Inc.
205
+This is free software; see the source for copying conditions.  There is NO
206
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
207
+
208
+configure:3682: $? = 0
209
+configure:3689: gcc -v >&5
210
+Using built-in specs.
211
+Target: i686-apple-darwin10
212
+Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
213
+Thread model: posix
214
+gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
215
+configure:3693: $? = 0
216
+configure:3700: gcc -V >&5
217
+gcc-4.2: argument to `-V' is missing
218
+configure:3704: $? = 1
219
+configure:3707: checking whether we are using the GNU C compiler
220
+configure:3736: gcc -c   conftest.c >&5
221
+configure:3743: $? = 0
222
+configure:3760: result: yes
223
+configure:3769: checking whether gcc accepts -g
224
+configure:3799: gcc -c -g  conftest.c >&5
225
+configure:3806: $? = 0
226
+configure:3907: result: yes
227
+configure:3924: checking for gcc option to accept ISO C89
228
+configure:3998: gcc  -c -g -O2  conftest.c >&5
229
+configure:4005: $? = 0
230
+configure:4028: result: none needed
231
+configure:4048: checking for jags_version in -ljags
232
+configure:4083: gcc -o conftest -g -O2  -L/usr/local/lib conftest.c -ljags   >&5
233
+configure:4090: $? = 0
234
+configure:4111: result: yes
235
+configure:4301: creating ./config.status
236
+
237
+## ---------------------- ##
238
+## Running config.status. ##
239
+## ---------------------- ##
240
+
241
+This file was extended by CoGAPS config.status 2.1.0, which was
242
+generated by GNU Autoconf 2.63.  Invocation command line was
243
+
244
+  CONFIG_FILES    = 
245
+  CONFIG_HEADERS  = 
246
+  CONFIG_LINKS    = 
247
+  CONFIG_COMMANDS = 
248
+  $ ./config.status 
249
+
250
+on Elana-Fertigs-Mac-Pro.local
251
+
252
+config.status:652: creating src/Makevars
253
+configure:5413: creating ./config.status
254
+
255
+## ---------------------- ##
256
+## Running config.status. ##
257
+## ---------------------- ##
258
+
259
+This file was extended by CoGAPS config.status 2.1.0, which was
260
+generated by GNU Autoconf 2.63.  Invocation command line was
261
+
262
+  CONFIG_FILES    = 
263
+  CONFIG_HEADERS  = 
264
+  CONFIG_LINKS    = 
265
+  CONFIG_COMMANDS = 
266
+  $ ./config.status 
267
+
268
+on Elana-Fertigs-Mac-Pro.local
269
+
270
+config.status:653: creating src/Makevars
271
+config.status:653: creating R/unix/zzz.R
272
+
273
+## ---------------- ##
274
+## Cache variables. ##
275
+## ---------------- ##
276
+
277
+ac_cv_c_compiler_gnu=yes
278
+ac_cv_cxx_compiler_gnu=yes
279
+ac_cv_env_CCC_set=
280
+ac_cv_env_CCC_value=
281
+ac_cv_env_CC_set=
282
+ac_cv_env_CC_value=
283
+ac_cv_env_CFLAGS_set=
284
+ac_cv_env_CFLAGS_value=
285
+ac_cv_env_CPPFLAGS_set=
286
+ac_cv_env_CPPFLAGS_value=
287
+ac_cv_env_CXXCPP_set=
288
+ac_cv_env_CXXCPP_value=
289
+ac_cv_env_CXXFLAGS_set=
290
+ac_cv_env_CXXFLAGS_value=
291
+ac_cv_env_CXX_set=
292
+ac_cv_env_CXX_value=
293
+ac_cv_env_LDFLAGS_set=
294
+ac_cv_env_LDFLAGS_value=
295
+ac_cv_env_LIBS_set=
296
+ac_cv_env_LIBS_value=
297
+ac_cv_env_build_alias_set=
298
+ac_cv_env_build_alias_value=
299
+ac_cv_env_host_alias_set=
300
+ac_cv_env_host_alias_value=
301
+ac_cv_env_target_alias_set=
302
+ac_cv_env_target_alias_value=
303
+ac_cv_header_Console_h=yes
304
+ac_cv_header_inttypes_h=yes
305
+ac_cv_header_memory_h=yes
306
+ac_cv_header_stdc=yes
307
+ac_cv_header_stdint_h=yes
308
+ac_cv_header_stdlib_h=yes
309
+ac_cv_header_string_h=yes
310
+ac_cv_header_strings_h=yes
311
+ac_cv_header_sys_stat_h=yes
312
+ac_cv_header_sys_types_h=yes
313
+ac_cv_header_unistd_h=yes
314
+ac_cv_lib_jags_jags_version=yes
315
+ac_cv_objext=o
316
+ac_cv_path_EGREP='/usr/bin/grep -E'
317
+ac_cv_path_GREP=/usr/bin/grep
318
+ac_cv_path_ac_prefix_program=/usr/local/bin/jags
319
+ac_cv_prog_CXXCPP='g++ -E'
320
+ac_cv_prog_ac_ct_CC=gcc
321
+ac_cv_prog_ac_ct_CXX=g++
322
+ac_cv_prog_cc_c89=
323
+ac_cv_prog_cc_g=yes
324
+ac_cv_prog_cxx_g=yes
325
+
326
+## ----------------- ##
327
+## Output variables. ##
328
+## ----------------- ##
329
+
330
+CC='gcc'
331
+CFLAGS='-g -O2'
332
+CPPFLAGS=''
333
+CXX='g++'
334
+CXXCPP='g++ -E'
335
+CXXFLAGS='-g -O2'
336
+DEFS='-DPACKAGE_NAME=\"CoGAPS\" -DPACKAGE_TARNAME=\"CoGAPS\" -DPACKAGE_VERSION=\"2.1.0\" -DPACKAGE_STRING=\"CoGAPS\ 2.1.0\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBJAGS=1'
337
+ECHO_C='\c'
338
+ECHO_N=''
339
+ECHO_T=''
340
+EGREP='/usr/bin/grep -E'
341
+EXEEXT=''
342
+GREP='/usr/bin/grep'
343
+JAGS_INCLUDE='/usr/local/include/GAPS-JAGS'
344
+JAGS_LIB='/usr/local/lib'
345
+JAGS_MODULES='/usr/local/lib/JAGS/modules-1.0.2'
346
+LDFLAGS=''
347
+LIBOBJS=''
348
+LIBS='-ljags '
349
+LTLIBOBJS=''
350
+OBJEXT='o'
351
+PACKAGE_BUGREPORT=''
352
+PACKAGE_NAME='CoGAPS'
353
+PACKAGE_STRING='CoGAPS 2.1.0'
354
+PACKAGE_TARNAME='CoGAPS'
355
+PACKAGE_VERSION='2.1.0'
356
+PATH_SEPARATOR=':'
357
+SHELL='/bin/sh'
358
+ac_ct_CC='gcc'
359
+ac_ct_CXX='g++'
360
+ac_prefix_program='/usr/local/bin/jags'
361
+bindir='${exec_prefix}/bin'
362
+build_alias=''
363
+datadir='${datarootdir}'
364
+datarootdir='${prefix}/share'
365
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
366
+dvidir='${docdir}'
367
+exec_prefix='${prefix}'
368
+host_alias=''
369
+htmldir='${docdir}'
370
+includedir='${prefix}/include'
371
+infodir='${datarootdir}/info'
372
+libdir='${exec_prefix}/lib'
373
+libexecdir='${exec_prefix}/libexec'
374
+localedir='${datarootdir}/locale'
375
+localstatedir='${prefix}/var'
376
+mandir='${datarootdir}/man'
377
+oldincludedir='/usr/include'
378
+pdfdir='${docdir}'
379
+prefix='/usr/local'
380
+program_transform_name='s,x,x,'
381
+psdir='${docdir}'
382
+sbindir='${exec_prefix}/sbin'
383
+sharedstatedir='${prefix}/com'
384
+sysconfdir='${prefix}/etc'
385
+target_alias=''
386
+
387
+## ----------- ##
388
+## confdefs.h. ##
389
+## ----------- ##
390
+
391
+#define PACKAGE_NAME "CoGAPS"
392
+#define PACKAGE_TARNAME "CoGAPS"
393
+#define PACKAGE_VERSION "2.1.0"
394
+#define PACKAGE_STRING "CoGAPS 2.1.0"
395
+#define PACKAGE_BUGREPORT ""
396
+#define STDC_HEADERS 1
397
+#define HAVE_SYS_TYPES_H 1
398
+#define HAVE_SYS_STAT_H 1
399
+#define HAVE_STDLIB_H 1
400
+#define HAVE_STRING_H 1
401
+#define HAVE_MEMORY_H 1
402
+#define HAVE_STRINGS_H 1
403
+#define HAVE_INTTYPES_H 1
404
+#define HAVE_STDINT_H 1
405
+#define HAVE_UNISTD_H 1
406
+#define HAVE_LIBJAGS 1
407
+
408
+configure: exit 0
0 409
new file mode 100755
... ...
@@ -0,0 +1,859 @@
1
+#! /bin/sh
2
+# Generated by configure.
3
+# Run this file to recreate the current configuration.
4
+# Compiler output produced by configure, useful for debugging
5
+# configure, is in config.log if it exists.
6
+
7
+debug=false
8
+ac_cs_recheck=false
9
+ac_cs_silent=false
10
+SHELL=${CONFIG_SHELL-/bin/sh}
11
+## --------------------- ##
12
+## M4sh Initialization.  ##
13
+## --------------------- ##
14
+
15
+# Be more Bourne compatible
16
+DUALCASE=1; export DUALCASE # for MKS sh
17
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18
+  emulate sh
19
+  NULLCMD=:
20
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21
+  # is contrary to our usage.  Disable this feature.
22
+  alias -g '${1+"$@"}'='"$@"'
23
+  setopt NO_GLOB_SUBST
24
+else
25
+  case `(set -o) 2>/dev/null` in
26
+  *posix*) set -o posix ;;
27
+esac
28
+
29
+fi
30
+
31
+
32
+
33
+
34
+# PATH needs CR
35
+# Avoid depending upon Character Ranges.
36
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
37
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
38
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
39
+as_cr_digits='0123456789'
40
+as_cr_alnum=$as_cr_Letters$as_cr_digits
41
+
42
+as_nl='
43
+'
44
+export as_nl
45
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
46
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50
+  as_echo='printf %s\n'
51
+  as_echo_n='printf %s'
52
+else
53
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55
+    as_echo_n='/usr/ucb/echo -n'
56
+  else
57
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58
+    as_echo_n_body='eval
59
+      arg=$1;
60
+      case $arg in
61
+      *"$as_nl"*)
62
+	expr "X$arg" : "X\\(.*\\)$as_nl";
63
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64
+      esac;
65
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66
+    '
67
+    export as_echo_n_body
68
+    as_echo_n='sh -c $as_echo_n_body as_echo'
69
+  fi
70
+  export as_echo_body
71
+  as_echo='sh -c $as_echo_body as_echo'
72
+fi
73
+
74
+# The user is always right.
75
+if test "${PATH_SEPARATOR+set}" != set; then
76
+  PATH_SEPARATOR=:
77
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79
+      PATH_SEPARATOR=';'
80
+  }
81
+fi
82
+
83
+# Support unset when possible.
84
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
85
+  as_unset=unset
86
+else
87
+  as_unset=false
88
+fi
89
+
90
+
91
+# IFS
92
+# We need space, tab and new line, in precisely that order.  Quoting is
93
+# there to prevent editors from complaining about space-tab.
94
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
95
+# splitting by setting IFS to empty value.)
96
+IFS=" ""	$as_nl"
97
+
98
+# Find who we are.  Look in the path if we contain no directory separator.
99
+case $0 in
100
+  *[\\/]* ) as_myself=$0 ;;
101
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102
+for as_dir in $PATH
103
+do
104
+  IFS=$as_save_IFS
105
+  test -z "$as_dir" && as_dir=.
106
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107
+done
108
+IFS=$as_save_IFS
109
+
110
+     ;;
111
+esac
112
+# We did not find ourselves, most probably we were run as `sh COMMAND'
113
+# in which case we are not to be found in the path.
114
+if test "x$as_myself" = x; then
115
+  as_myself=$0
116
+fi
117
+if test ! -f "$as_myself"; then
118
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119
+  { (exit 1); exit 1; }
120
+fi
121
+
122
+# Work around bugs in pre-3.0 UWIN ksh.
123
+for as_var in ENV MAIL MAILPATH
124
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
125
+done
126
+PS1='$ '
127
+PS2='> '
128
+PS4='+ '
129
+
130
+# NLS nuisances.
131
+LC_ALL=C
132
+export LC_ALL
133
+LANGUAGE=C
134
+export LANGUAGE
135
+
136
+# Required to use basename.
137
+if expr a : '\(a\)' >/dev/null 2>&1 &&
138
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
139
+  as_expr=expr
140
+else
141
+  as_expr=false
142
+fi
143
+
144
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
145
+  as_basename=basename
146
+else
147
+  as_basename=false
148
+fi
149
+
150
+
151
+# Name of the executable.
152
+as_me=`$as_basename -- "$0" ||
153
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
154
+	 X"$0" : 'X\(//\)$' \| \
155
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
156
+$as_echo X/"$0" |
157
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
158
+	    s//\1/
159
+	    q
160
+	  }
161
+	  /^X\/\(\/\/\)$/{
162
+	    s//\1/
163
+	    q
164
+	  }
165
+	  /^X\/\(\/\).*/{
166
+	    s//\1/
167
+	    q
168
+	  }
169
+	  s/.*/./; q'`
170
+
171
+# CDPATH.
172
+$as_unset CDPATH
173
+
174
+
175
+
176
+  as_lineno_1=$LINENO
177
+  as_lineno_2=$LINENO
178
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
179
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
180
+
181
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
182
+  # uniformly replaced by the line number.  The first 'sed' inserts a
183
+  # line-number line after each line using $LINENO; the second 'sed'
184
+  # does the real work.  The second script uses 'N' to pair each
185
+  # line-number line with the line containing $LINENO, and appends
186
+  # trailing '-' during substitution so that $LINENO is not a special
187
+  # case at line end.
188
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
189
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
190
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
191
+  sed -n '
192
+    p
193
+    /[$]LINENO/=
194
+  ' <$as_myself |
195
+    sed '
196
+      s/[$]LINENO.*/&-/
197
+      t lineno
198
+      b
199
+      :lineno
200
+      N
201
+      :loop
202
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
203
+      t loop
204
+      s/-\n.*//
205
+    ' >$as_me.lineno &&
206
+  chmod +x "$as_me.lineno" ||
207
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
208
+   { (exit 1); exit 1; }; }
209
+
210
+  # Don't try to exec as it changes $[0], causing all sort of problems
211
+  # (the dirname of $[0] is not the place where we might find the
212
+  # original and so on.  Autoconf is especially sensitive to this).
213
+  . "./$as_me.lineno"
214
+  # Exit status is that of the last command.
215
+  exit
216
+}
217
+
218
+
219
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
220
+  as_dirname=dirname
221
+else
222
+  as_dirname=false
223
+fi
224
+
225
+ECHO_C= ECHO_N= ECHO_T=
226
+case `echo -n x` in
227
+-n*)
228
+  case `echo 'x\c'` in
229
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
230
+  *)   ECHO_C='\c';;
231
+  esac;;
232
+*)
233
+  ECHO_N='-n';;
234
+esac
235
+if expr a : '\(a\)' >/dev/null 2>&1 &&
236
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
237
+  as_expr=expr
238
+else
239
+  as_expr=false
240
+fi
241
+
242
+rm -f conf$$ conf$$.exe conf$$.file
243
+if test -d conf$$.dir; then
244
+  rm -f conf$$.dir/conf$$.file
245
+else
246
+  rm -f conf$$.dir
247
+  mkdir conf$$.dir 2>/dev/null
248
+fi
249
+if (echo >conf$$.file) 2>/dev/null; then
250
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
251
+    as_ln_s='ln -s'
252
+    # ... but there are two gotchas:
253
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
254
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
255
+    # In both cases, we have to default to `cp -p'.
256
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
257
+      as_ln_s='cp -p'
258
+  elif ln conf$$.file conf$$ 2>/dev/null; then
259
+    as_ln_s=ln
260
+  else
261
+    as_ln_s='cp -p'
262
+  fi
263
+else
264
+  as_ln_s='cp -p'
265
+fi
266
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
267
+rmdir conf$$.dir 2>/dev/null
268
+
269
+if mkdir -p . 2>/dev/null; then
270
+  as_mkdir_p=:
271
+else
272
+  test -d ./-p && rmdir ./-p
273
+  as_mkdir_p=false
274
+fi
275
+
276
+if test -x / >/dev/null 2>&1; then
277
+  as_test_x='test -x'
278
+else
279
+  if ls -dL / >/dev/null 2>&1; then
280
+    as_ls_L_option=L
281
+  else
282
+    as_ls_L_option=
283
+  fi
284
+  as_test_x='
285
+    eval sh -c '\''
286
+      if test -d "$1"; then
287
+	test -d "$1/.";
288
+      else
289
+	case $1 in
290
+	-*)set "./$1";;
291
+	esac;
292
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
293
+	???[sx]*):;;*)false;;esac;fi
294
+    '\'' sh
295
+  '
296
+fi
297
+as_executable_p=$as_test_x
298
+
299
+# Sed expression to map a string onto a valid CPP name.
300
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
301
+
302
+# Sed expression to map a string onto a valid variable name.
303
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
304
+
305
+
306
+exec 6>&1
307
+
308
+# Save the log message, to keep $[0] and so on meaningful, and to
309
+# report actual input values of CONFIG_FILES etc. instead of their
310
+# values after options handling.
311
+ac_log="
312
+This file was extended by CoGAPS $as_me 2.1.0, which was
313
+generated by GNU Autoconf 2.63.  Invocation command line was
314
+
315
+  CONFIG_FILES    = $CONFIG_FILES
316
+  CONFIG_HEADERS  = $CONFIG_HEADERS
317
+  CONFIG_LINKS    = $CONFIG_LINKS
318
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
319
+  $ $0 $@
320
+
321
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
322
+"
323
+
324
+# Files that config.status was made for.
325
+config_files=" src/Makevars R/unix/zzz.R"
326
+
327
+ac_cs_usage="\
328
+\`$as_me' instantiates files from templates according to the
329
+current configuration.
330
+
331
+Usage: $0 [OPTION]... [FILE]...
332
+
333
+  -h, --help       print this help, then exit
334
+  -V, --version    print version number and configuration settings, then exit
335
+  -q, --quiet, --silent
336
+                   do not print progress messages
337
+  -d, --debug      don't remove temporary files
338
+      --recheck    update $as_me by reconfiguring in the same conditions
339
+      --file=FILE[:TEMPLATE]
340
+                   instantiate the configuration file FILE
341
+
342
+Configuration files:
343
+$config_files
344
+
345
+Report bugs to <bug-autoconf@gnu.org>."
346
+
347
+ac_cs_version="\
348
+CoGAPS config.status 2.1.0
349
+configured by ./configure, generated by GNU Autoconf 2.63,
350
+  with options \"'--with-jags-include=/usr/local/include/GAPS-JAGS' '--with-jags-lib=/usr/local/lib' '--with-jags-modules=/usr/local/lib/JAGS/modules-1.0.2'\"
351
+
352
+Copyright (C) 2008 Free Software Foundation, Inc.
353
+This config.status script is free software; the Free Software Foundation
354
+gives unlimited permission to copy, distribute and modify it."
355
+
356
+ac_pwd='/Users/ejfertig/Documents/CoGAPSBioc/CoGAPSNoRJAGS'
357
+srcdir='.'
358
+test -n "$AWK" || AWK=awk
359
+# The default lists apply if the user does not specify any file.
360
+ac_need_defaults=:
361
+while test $# != 0
362
+do
363
+  case $1 in
364
+  --*=*)
365
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
366
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
367
+    ac_shift=:
368
+    ;;
369
+  *)
370
+    ac_option=$1
371
+    ac_optarg=$2
372
+    ac_shift=shift
373
+    ;;
374
+  esac
375
+
376
+  case $ac_option in
377
+  # Handling of the options.
378
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
379
+    ac_cs_recheck=: ;;
380
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
381
+    $as_echo "$ac_cs_version"; exit ;;
382
+  --debug | --debu | --deb | --de | --d | -d )
383
+    debug=: ;;
384
+  --file | --fil | --fi | --f )
385
+    $ac_shift
386
+    case $ac_optarg in
387
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
388
+    esac
389
+    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
390
+    ac_need_defaults=false;;
391
+  --he | --h |  --help | --hel | -h )
392
+    $as_echo "$ac_cs_usage"; exit ;;
393
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
395
+    ac_cs_silent=: ;;
396
+
397
+  # This is an error.
398
+  -*) { $as_echo "$as_me: error: unrecognized option: $1
399
+Try \`$0 --help' for more information." >&2
400
+   { (exit 1); exit 1; }; } ;;
401
+
402
+  *) ac_config_targets="$ac_config_targets $1"
403
+     ac_need_defaults=false ;;
404
+
405
+  esac
406
+  shift
407
+done
408
+
409
+ac_configure_extra_args=
410
+
411
+if $ac_cs_silent; then
412
+  exec 6>/dev/null
413
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
414
+fi
415
+
416
+if $ac_cs_recheck; then
417
+  set X '/bin/sh' './configure'  '--with-jags-include=/usr/local/include/GAPS-JAGS' '--with-jags-lib=/usr/local/lib' '--with-jags-modules=/usr/local/lib/JAGS/modules-1.0.2' $ac_configure_extra_args --no-create --no-recursion
418
+  shift
419
+  $as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
420
+  CONFIG_SHELL='/bin/sh'
421
+  export CONFIG_SHELL
422
+  exec "$@"
423
+fi
424
+
425
+exec 5>>config.log
426
+{
427
+  echo
428
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
429
+## Running $as_me. ##
430
+_ASBOX
431
+  $as_echo "$ac_log"
432
+} >&5
433
+
434
+
435
+# Handling of arguments.
436
+for ac_config_target in $ac_config_targets
437
+do
438
+  case $ac_config_target in
439
+    "src/Makevars") CONFIG_FILES="$CONFIG_FILES src/Makevars" ;;
440
+    "R/unix/zzz.R") CONFIG_FILES="$CONFIG_FILES R/unix/zzz.R" ;;
441
+
442
+  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
443
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
444
+   { (exit 1); exit 1; }; };;
445
+  esac
446
+done
447
+
448
+
449
+# If the user did not use the arguments to specify the items to instantiate,
450
+# then the envvar interface is used.  Set only those that are not.
451
+# We use the long form for the default assignment because of an extremely
452
+# bizarre bug on SunOS 4.1.3.
453
+if $ac_need_defaults; then
454
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
455
+fi
456
+
457
+# Have a temporary directory for convenience.  Make it in the build tree
458
+# simply because there is no reason against having it here, and in addition,
459
+# creating and moving files from /tmp can sometimes cause problems.
460
+# Hook for its removal unless debugging.
461
+# Note that there is a small window in which the directory will not be cleaned:
462
+# after its creation but before its name has been assigned to `$tmp'.
463
+$debug ||
464
+{
465
+  tmp=
466
+  trap 'exit_status=$?
467
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
468
+' 0
469
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
470
+}
471
+# Create a (secure) tmp directory for tmp files.
472
+
473
+{
474
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
475
+  test -n "$tmp" && test -d "$tmp"
476
+}  ||
477
+{
478
+  tmp=./conf$$-$RANDOM
479
+  (umask 077 && mkdir "$tmp")
480
+} ||
481
+{
482
+   $as_echo "$as_me: cannot create a temporary directory in ." >&2
483
+   { (exit 1); exit 1; }
484
+}
485
+
486
+# Set up the scripts for CONFIG_FILES section.
487
+# No need to generate them if there are no CONFIG_FILES.
488
+# This happens for instance with `./config.status config.h'.
489
+if test -n "$CONFIG_FILES"; then
490
+
491
+
492
+ac_cr='
'
493
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
494
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
495
+  ac_cs_awk_cr='\\r'
496
+else
497
+  ac_cs_awk_cr=$ac_cr
498
+fi
499
+
500
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
501
+cat >>"$tmp/subs1.awk" <<\_ACAWK &&
502
+S["LTLIBOBJS"]=""
503
+S["LIBOBJS"]=""
504
+S["JAGS_MODULES"]="/usr/local/lib/JAGS/modules-1.0.2"
505
+S["JAGS_LIB"]="/usr/local/lib"
506
+S["JAGS_INCLUDE"]="/usr/local/include/GAPS-JAGS"
507
+S["ac_ct_CC"]="gcc"
508
+S["CFLAGS"]="-g -O2"
509
+S["CC"]="gcc"
510
+S["EGREP"]="/usr/bin/grep -E"
511
+S["GREP"]="/usr/bin/grep"
512
+S["CXXCPP"]="g++ -E"
513
+S["OBJEXT"]="o"
514
+S["EXEEXT"]=""
515
+S["ac_ct_CXX"]="g++"
516
+S["CPPFLAGS"]=""
517
+S["LDFLAGS"]=""
518
+S["CXXFLAGS"]="-g -O2"
519
+S["CXX"]="g++"
520
+S["ac_prefix_program"]="/usr/local/bin/jags"
521
+S["target_alias"]=""
522
+S["host_alias"]=""
523
+S["build_alias"]=""
524
+S["LIBS"]="-ljags "
525
+S["ECHO_T"]=""
526
+S["ECHO_N"]=""
527
+S["ECHO_C"]="\\c"
528
+S["DEFS"]="-DPACKAGE_NAME=\\\"CoGAPS\\\" -DPACKAGE_TARNAME=\\\"CoGAPS\\\" -DPACKAGE_VERSION=\\\"2.1.0\\\" -DPACKAGE_STRING=\\\"CoGAPS\\ 2.1.0\\\" -DPACKAGE_BUGREPORT=\\\"\\\" -DSTD"\
529
+"C_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -D"\
530
+"HAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBJAGS=1"
531
+S["mandir"]="${datarootdir}/man"
532
+S["localedir"]="${datarootdir}/locale"
533
+S["libdir"]="${exec_prefix}/lib"
534
+S["psdir"]="${docdir}"
535
+S["pdfdir"]="${docdir}"
536
+S["dvidir"]="${docdir}"
537
+S["htmldir"]="${docdir}"
538
+S["infodir"]="${datarootdir}/info"
539
+S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}"
540
+S["oldincludedir"]="/usr/include"
541
+S["includedir"]="${prefix}/include"
542
+S["localstatedir"]="${prefix}/var"
543
+S["sharedstatedir"]="${prefix}/com"
544
+S["sysconfdir"]="${prefix}/etc"
545
+S["datadir"]="${datarootdir}"
546
+S["datarootdir"]="${prefix}/share"
547
+S["libexecdir"]="${exec_prefix}/libexec"
548
+S["sbindir"]="${exec_prefix}/sbin"
549
+S["bindir"]="${exec_prefix}/bin"
550
+S["program_transform_name"]="s,x,x,"
551
+S["prefix"]="/usr/local"
552
+S["exec_prefix"]="${prefix}"
553
+S["PACKAGE_BUGREPORT"]=""
554
+S["PACKAGE_STRING"]="CoGAPS 2.1.0"
555
+S["PACKAGE_VERSION"]="2.1.0"
556
+S["PACKAGE_TARNAME"]="CoGAPS"
557
+S["PACKAGE_NAME"]="CoGAPS"
558
+S["PATH_SEPARATOR"]=":"
559
+S["SHELL"]="/bin/sh"
560
+_ACAWK
561
+cat >>"$tmp/subs1.awk" <<_ACAWK &&
562
+  for (key in S) S_is_set[key] = 1
563
+  FS = ""
564
+
565
+}
566
+{
567
+  line = $ 0
568
+  nfields = split(line, field, "@")
569
+  substed = 0
570
+  len = length(field[1])
571
+  for (i = 2; i < nfields; i++) {
572
+    key = field[i]
573
+    keylen = length(key)
574
+    if (S_is_set[key]) {
575
+      value = S[key]
576
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
577
+      len += length(value) + length(field[++i])
578
+      substed = 1
579
+    } else
580
+      len += 1 + keylen
581
+  }
582
+
583
+  print line
584
+}
585
+
586
+_ACAWK
587
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
588
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
589
+else
590
+  cat
591
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
592
+  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
593
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
594
+   { (exit 1); exit 1; }; }
595
+fi # test -n "$CONFIG_FILES"
596
+
597
+
598
+eval set X "  :F $CONFIG_FILES      "
599
+shift
600
+for ac_tag
601
+do
602
+  case $ac_tag in
603
+  :[FHLC]) ac_mode=$ac_tag; continue;;
604
+  esac
605
+  case $ac_mode$ac_tag in
606
+  :[FHL]*:*);;
607
+  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
608
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
609
+   { (exit 1); exit 1; }; };;
610
+  :[FH]-) ac_tag=-:-;;
611
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
612
+  esac
613
+  ac_save_IFS=$IFS
614
+  IFS=:
615
+  set x $ac_tag
616
+  IFS=$ac_save_IFS
617
+  shift
618
+  ac_file=$1
619
+  shift
620
+
621
+  case $ac_mode in
622
+  :L) ac_source=$1;;
623
+  :[FH])
624
+    ac_file_inputs=
625
+    for ac_f
626
+    do
627
+      case $ac_f in
628
+      -) ac_f="$tmp/stdin";;
629
+      *) # Look for the file first in the build tree, then in the source tree
630
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
631
+	 # because $ac_f cannot contain `:'.
632
+	 test -f "$ac_f" ||
633
+	   case $ac_f in
634
+	   [\\/$]*) false;;
635
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
636
+	   esac ||
637
+	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
638
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
639
+   { (exit 1); exit 1; }; };;
640
+      esac
641
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
642
+      ac_file_inputs="$ac_file_inputs '$ac_f'"
643
+    done
644
+
645
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
646
+    # use $as_me), people would be surprised to read:
647
+    #    /* config.h.  Generated by config.status.  */
648
+    configure_input='Generated from '`
649
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
650
+	`' by configure.'
651
+    if test x"$ac_file" != x-; then
652
+      configure_input="$ac_file.  $configure_input"
653
+      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
654
+$as_echo "$as_me: creating $ac_file" >&6;}
655
+    fi
656
+    # Neutralize special characters interpreted by sed in replacement strings.
657
+    case $configure_input in #(
658
+    *\&* | *\|* | *\\* )
659
+       ac_sed_conf_input=`$as_echo "$configure_input" |
660
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
661
+    *) ac_sed_conf_input=$configure_input;;
662
+    esac
663
+
664
+    case $ac_tag in
665
+    *:-:* | *:-) cat >"$tmp/stdin" \
666
+      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
667
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
668
+   { (exit 1); exit 1; }; } ;;
669
+    esac
670
+    ;;
671
+  esac
672
+
673
+  ac_dir=`$as_dirname -- "$ac_file" ||
674
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
675
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
676
+	 X"$ac_file" : 'X\(//\)$' \| \
677
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
678
+$as_echo X"$ac_file" |
679
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
680
+	    s//\1/
681
+	    q
682
+	  }
683
+	  /^X\(\/\/\)[^/].*/{
684
+	    s//\1/
685
+	    q
686
+	  }
687
+	  /^X\(\/\/\)$/{
688
+	    s//\1/
689
+	    q
690
+	  }
691
+	  /^X\(\/\).*/{
692
+	    s//\1/
693
+	    q
694
+	  }
695
+	  s/.*/./; q'`
696
+  { as_dir="$ac_dir"
697
+  case $as_dir in #(
698
+  -*) as_dir=./$as_dir;;
699
+  esac
700
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
701
+    as_dirs=
702
+    while :; do
703
+      case $as_dir in #(
704
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
705
+      *) as_qdir=$as_dir;;
706
+      esac
707
+      as_dirs="'$as_qdir' $as_dirs"
708
+      as_dir=`$as_dirname -- "$as_dir" ||
709
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
710
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
711
+	 X"$as_dir" : 'X\(//\)$' \| \
712
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
713
+$as_echo X"$as_dir" |
714
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
715
+	    s//\1/
716
+	    q
717
+	  }
718
+	  /^X\(\/\/\)[^/].*/{
719
+	    s//\1/
720
+	    q
721
+	  }
722
+	  /^X\(\/\/\)$/{
723
+	    s//\1/
724
+	    q
725
+	  }