Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

First commit of img package

  • Loading branch information...
commit 29bba4e1bb386c19bc0422de0200862d84fca4bc 1 parent 8fd0a98
@laurentbartholdi authored
Showing with 17,530 additions and 16,556 deletions.
  1. +2 −1  .gitignore
  2. +18 −26 PackageInfo.g
  3. +30 −30 cnf/Makefile.in
  4. +4 −0 cnf/aclocal.m4
  5. 0  {hurwitz → cnf}/config.h.in
  6. +0 −822 cnf/config.log
  7. +17 −33 cnf/configure.ac
  8. +1 −0  cnf/files.g.in
  9. +47 −0 cnf/m4/ac_check_cholmod.m4
  10. +35 −1 cnf/m4/ac_check_levmar.m4
  11. +71 −0 cnf/m4/ac_check_libdogleg.m4
  12. +45 −0 cnf/m4/ac_prog_javac.m4
  13. +36 −0 cnf/m4/ac_prog_javac_works.m4
  14. +4,606 −394 configure
  15. +0 −5 extern/GET_LIBRARIES
  16. +75 −0 extern/levmar-2.6/Axb.c
  17. +1,282 −0 extern/levmar-2.6/Axb_core.c
  18. +97 −0 extern/levmar-2.6/CMakeLists.txt
  19. +340 −0 extern/levmar-2.6/LICENSE
  20. +62 −0 extern/levmar-2.6/Makefile.icc
  21. +49 −0 extern/levmar-2.6/Makefile.so
  22. +59 −0 extern/levmar-2.6/Makefile.vc
  23. +75 −0 extern/levmar-2.6/README.txt
  24. +49 −0 extern/levmar-2.6/compiler.h
  25. +122 −0 extern/levmar-2.6/expfit.c
  26. +398 −0 extern/levmar-2.6/levmar.h
  27. +398 −0 extern/levmar-2.6/levmar.h.in
  28. +83 −0 extern/levmar-2.6/lm.c
  29. +11 −0 extern/levmar-2.6/lm.h
  30. +858 −0 extern/levmar-2.6/lm_core.c
  31. +87 −0 extern/levmar-2.6/lmbc.c
  32. +1,154 −0 extern/levmar-2.6/lmbc_core.c
  33. +87 −0 extern/levmar-2.6/lmblec.c
  34. +413 −0 extern/levmar-2.6/lmblec_core.c
  35. +89 −0 extern/levmar-2.6/lmbleic.c
  36. +506 −0 extern/levmar-2.6/lmbleic_core.c
  37. +1,230 −0 extern/levmar-2.6/lmdemo.c
  38. +80 −0 extern/levmar-2.6/lmlec.c
  39. +656 −0 extern/levmar-2.6/lmlec_core.c
  40. +58 −0 extern/levmar-2.6/matlab/CMakeLists.txt
  41. +26 −0 extern/levmar-2.6/matlab/Makefile.w32
  42. +35 −0 extern/levmar-2.6/matlab/README.txt
  43. +11 −0 extern/levmar-2.6/matlab/bt3.m
  44. +8 −0 extern/levmar-2.6/matlab/expfit.m
  45. +6 −0 extern/levmar-2.6/matlab/hs01.m
  46. +13 −0 extern/levmar-2.6/matlab/jacbt3.m
  47. +7 −0 extern/levmar-2.6/matlab/jacexpfit.m
  48. +5 −0 extern/levmar-2.6/matlab/jachs01.m
  49. +10 −0 extern/levmar-2.6/matlab/jacmeyer.m
  50. +9 −0 extern/levmar-2.6/matlab/jacmodhs38.m
  51. +7 −0 extern/levmar-2.6/matlab/jacmodhs52.m
  52. +7 −0 extern/levmar-2.6/matlab/jacmodhs76.m
  53. +11 −0 extern/levmar-2.6/matlab/jacosborne.m
  54. +692 −0 extern/levmar-2.6/matlab/levmar.c
  55. +83 −0 extern/levmar-2.6/matlab/levmar.m
  56. +140 −0 extern/levmar-2.6/matlab/lmdemo.m
  57. +9 −0 extern/levmar-2.6/matlab/meyer.m
  58. +8 −0 extern/levmar-2.6/matlab/modhs38.m
  59. +7 −0 extern/levmar-2.6/matlab/modhs52.m
  60. +7 −0 extern/levmar-2.6/matlab/modhs76.m
  61. +5 −0 extern/levmar-2.6/matlab/mods235.m
  62. +7 −0 extern/levmar-2.6/matlab/osborne.m
  63. +70 −0 extern/levmar-2.6/misc.c
  64. +114 −0 extern/levmar-2.6/misc.h
  65. +826 −0 extern/levmar-2.6/misc_core.c
  66. +64 −0 extern/libdogleg-0.08/Changes
  67. +2 −0  extern/libdogleg-0.08/LICENSE
  68. +349 −0 extern/libdogleg-0.08/README.pod
  69. +11 −0 extern/libdogleg-0.08/dogleg-pic.d
  70. BIN  extern/libdogleg-0.08/dogleg-pic.o
  71. +788 −0 extern/libdogleg-0.08/dogleg.c
  72. +11 −0 extern/libdogleg-0.08/dogleg.d
  73. +127 −0 extern/libdogleg-0.08/dogleg.h
  74. BIN  extern/libdogleg-0.08/dogleg.o
  75. +485 −0 extern/libdogleg-0.08/libdogleg.3
  76. BIN  extern/libdogleg-0.08/libdogleg.a
  77. +1 −0  extern/libdogleg-0.08/libdogleg.so
  78. +1 −0  extern/libdogleg-0.08/libdogleg.so.2
  79. BIN  extern/libdogleg-0.08/libdogleg.so.2.0.8
  80. +58 −0 extern/libdogleg-0.08/package_definitions/debian/changelog
  81. +1 −0  extern/libdogleg-0.08/package_definitions/debian/compat
  82. +33 −0 extern/libdogleg-0.08/package_definitions/debian/control
  83. +29 −0 extern/libdogleg-0.08/package_definitions/debian/copyright
  84. +6 −0 extern/libdogleg-0.08/package_definitions/debian/gbp.conf
  85. +1 −0  extern/libdogleg-0.08/package_definitions/debian/libdogleg-dev.docs
  86. +3 −0  extern/libdogleg-0.08/package_definitions/debian/libdogleg-dev.install
  87. +1 −0  extern/libdogleg-0.08/package_definitions/debian/libdogleg2.install
  88. +1 −0  extern/libdogleg-0.08/package_definitions/debian/manpages
  89. +16 −0 extern/libdogleg-0.08/package_definitions/debian/rules
  90. +1 −0  extern/libdogleg-0.08/package_definitions/debian/source/format
  91. +181 −0 extern/libdogleg-0.08/sample.c
  92. +0 −306 gap/algebra.gd
  93. +0 −537 gap/algebra.gi
  94. +4 −1,123 gap/examples.gd
  95. +2 −2,461 gap/examples.gi
  96. +0 −944 gap/frelement.gd
  97. +0 −1,263 gap/frelement.gi
  98. +0 −987 gap/frmachine.gd
  99. +0 −1,515 gap/frmachine.gi
  100. +0 −2,139 gap/group.gd
  101. +0 −3,208 gap/group.gi
  102. +1 −761 gap/helpers.gd
Sorry, we could not display the entire diff because it was too big.
View
3  .gitignore
@@ -7,7 +7,7 @@ sandbox
bin/*
*.dSYM
*~
-frbib.xml.bib
+imgbib.xml.bib
autom4te.cache
.DS_Store
doc/chap*
@@ -26,3 +26,4 @@ doc/*.out
doc/*.toc
myconfigure
.version
+src/config.h
View
44 PackageInfo.g
@@ -1,18 +1,16 @@
#############################################################################
##
-## PackageInfo.g for the package `FR' Laurent Bartholdi
-##
-## $Id$
+## PackageInfo.g for the package `IMG' Laurent Bartholdi
##
SetPackageInfo( rec(
-PackageName := "FR",
-Subtitle := "Computations with functionally recursive groups",
-Version := "1.2.7.1",
+PackageName := "IMG",
+Subtitle := "Computations with iterated monodromy groups",
+Version := "0.0.0",
## <#GAPDoc Label="Version">
-## 1.2.7.1
+## 0.0.0
## <#/GAPDoc>
-Date := "28/06/2012",
-ArchiveURL := Concatenation("http://www.uni-math.gwdg.de/laurent/FR/fr-",~.Version),
+Date := "15/11/2012",
+ArchiveURL := Concatenation("http://www.uni-math.gwdg.de/laurent/IMG/img-",~.Version),
ArchiveFormats := ".tar.gz",
Persons := [
rec(
@@ -36,33 +34,27 @@ Status := "deposited",
CommunicatedBy := "Götz Pfeiffer (NUI Galway)",
AcceptDate := "",
-README_URL := "http://www.uni-math.gwdg.de/laurent/FR/README.fr",
-PackageInfoURL := "http://www.uni-math.gwdg.de/laurent/FR/PackageInfo.g",
-AbstractHTML := "The <span class=\"pkgname\">FR</span> package allows \
- GAP to manipulate groups generated by automata, and more generally \
- functionally recursive groups",
-PackageWWWHome := "http://www.uni-math.gwdg.de/laurent/FR/",
+README_URL := "http://www.uni-math.gwdg.de/laurent/IMG/README.img",
+PackageInfoURL := "http://www.uni-math.gwdg.de/laurent/IMG/PackageInfo.g",
+AbstractHTML := "The <span class=\"pkgname\">IMG</span> package allows \
+ GAP to manipulate iterated monodromy groups",
+PackageWWWHome := "http://www.uni-math.gwdg.de/laurent/IMG/",
PackageDoc := rec(
- BookName := "FR",
+ BookName := "IMG",
HTMLStart := "doc/chap0.html",
PDFFile := "doc/manual.pdf",
SixFile := "doc/manual.six",
- LongTitle := "Functionally recursive and automata groups",
+ LongTitle := "Iterated monodromy groups",
ArchiveURLSubset := ["doc"],
Autoload := true
),
Dependencies := rec(
GAP := ">=4.5.0",
- NeededOtherPackages := [["FGA",">=1.1"],
- ["Polycyclic",">=2.2"],
+ NeededOtherPackages := [["FR",">=2.0.0"],
["GAPDoc",">=1.0"]],
- SuggestedOtherPackages := [["GBNP",">=0.9"],
- ["NQ",">=2.4"],
- ["Float",">=0.4"],
- ["NQL",">=0.10"]],
- # additional desired packages: graphviz, display
+ SuggestedOtherPackages := [["Float",">=0.4"]],
# for compilation of the external module, one needs:
# gcc, gfortran, libcblas, libgsl, javac, appletviewer.
@@ -71,9 +63,9 @@ Dependencies := rec(
AvailabilityTest := ReturnTrue,
-BannerString := Concatenation("Loading FR ", String( ~.Version ), " ...\n"),
+BannerString := Concatenation("Loading IMG ", String( ~.Version ), " ...\n"),
Autoload := false,
TestFile := "tst/testall.g",
-Keywords := ["functionally recursive group", "mealy machine", "automata group"]
+Keywords := ["iterated monodromy group"]
));
View
60 cnf/Makefile.in
@@ -1,10 +1,8 @@
#############################################################################
##
-#W Makefile Laurent Bartholdi
+#W Makefile.in Laurent Bartholdi
##
-#H @(#)$Id$
-##
-#Y Copyright (C) 2007, Laurent Bartholdi
+#Y Copyright (C) 2007-2012, Laurent Bartholdi
##
#############################################################################
##
@@ -13,39 +11,46 @@
##
#############################################################################
-.PHONY: all lib doc clean distribute mrproper wwwdir checkblocks tarballs hurwitz
+.PHONY: all lib doc clean distribute mrproper wwwdir checkblocks tarballs
LOCALBIN=bin/@GAPARCH@
EXTERN=$(CURDIR)/bin/@GAPARCH@/extern
+LEVMAR=extern/levmar-2.6
+LIBDOGLEG=extern/libdogleg-0.08
-MYCC=./libtool --mode=compile @CC@ $(CFLAGS) @CFLAGS@ @GAP_CPPFLAGS@ -std=c99 -g -Wall
-MYLD=./libtool --mode=link @CC@ $(CFLAGS) -g
+MYCC=./libtool --mode=compile --tag=CC $(CC) $(CFLAGS) @CFLAGS@ @GAP_CPPFLAGS@ -std=c99 -g -Wall
+MYLD=./libtool --mode=link --tag=CC $(CC) $(CFLAGS) -g
JAVAC=@JAVAC@
-all: $(LOCALBIN) @LIB_TARGET@ $(LOCALBIN)/fr_dll.so @JAVABUILD@ hurwitz
+all: $(LOCALBIN) @MAKE_LIBTARGETS@ $(LOCALBIN)/img_dll.so java/javaplot.class $(LOCALBIN)/layout $(LOCALBIN)/hsolve
-lib:
+distribute: wwwdir doc tarballs
-hurwitz:
- $(MAKE) -C $@
+@LEVMAR_MAKELIB@
-distribute: wwwdir doc tarballs
+@LIBDOGLEG_MAKELIB@
$(LOCALBIN):
mkdir -p $(LOCALBIN)
+$(LOCALBIN)/layout: src/layout.C
+ $(CXX) @CHOLMOD_CFLAGS@ @LIBDOGLEG_CFLAGS@ @LIBDOGLEG_LDFLAGS@ $< -o $@ @CHOLMOD_LIBS@ @LIBDOGLEG_LIBS@
+
+$(LOCALBIN)/hsolve: src/hsolve.C
+ $(CXX) @LEVMAR_CFLAGS@ @LEVMAR_LDFLAGS@ $< -o $@ @LEVMAR_LIBS@
+
$(LOCALBIN)/rpoly.lo: src/rpoly.c src/poly.h
$(MYCC) -c $< -o $@
-$(LOCALBIN)/p1.lo: src/p1.c src/cpoly.C src/fr_dll.h
+$(LOCALBIN)/p1.lo: src/p1.c src/cpoly.C src/img_dll.h
$(MYCC) -c $< -o $@ -DCONFIG_H
-$(LOCALBIN)/fr_dll.lo: src/fr_dll.c src/cpoly.C src/fr_dll.h
+$(LOCALBIN)/img_dll.lo: src/img_dll.c src/cpoly.C src/img_dll.h
$(MYCC) -c $< -o $@ @LEVMAR_CFLAGS@ -DCONFIG_H
-$(LOCALBIN)/fr_dll.so: $(LOCALBIN)/fr_dll.lo $(LOCALBIN)/rpoly.lo $(LOCALBIN)/p1.lo
- $(MYLD) -module -o $(LOCALBIN)/fr_dll.la $+ @LEVMAR_LDFLAGS@ @LEVMAR_LIBS@ -rpath $(PWD)/$(LOCALBIN)
- cp $(LOCALBIN)/.libs/fr_dll.so $@
+$(LOCALBIN)/img_dll.so: $(LOCALBIN)/img_dll.lo $(LOCALBIN)/rpoly.lo $(LOCALBIN)/p1.lo
+ $(MYLD) -module -o $(LOCALBIN)/img_dll.la $+ @LEVMAR_LDFLAGS@ @LEVMAR_LIBS@ -rpath $(PWD)/$(LOCALBIN)
+ cp $(LOCALBIN)/.libs/img_dll.so $@
java/javaplot.class: src/javaplot.java
$(JAVAC) -cp java/javaview.jar $< -d java
@@ -57,37 +62,32 @@ java/javaview.jar:
clean:
rm -rf .version config.log $(LOCALBIN) `find doc -type l`
- make -C hurwitz clean
mrproper: clean
- rm Makefile
- make -C hurwitz mrproper
+ rm Makefile config.h
configure: cnf/Makefile.in cnf/configure.ac
(cd cnf; aclocal -Im4; autoconf; mv -f configure ..)
- make -C hurwitz configure
.version: PackageInfo.g
grep '^Version :=' $< | awk -F'"' '{print $$2}' > $@
doc: doc/chap0.html
-doc/chap0.html: doc/fr.xml doc/frbib.xml gap/algebra.gd gap/frelement.gd \
- gap/group.gd gap/img.gd gap/perlist.gd gap/vector.gd gap/examples.gd \
- gap/frmachine.gd gap/helpers.gd gap/mealy.gd gap/trans.gd
- echo 'LoadPackage("fr"); DOC@FR();' | @GAP_EXEC@ -r -q
+doc/chap0.html: doc/img.xml doc/imgbib.xml gap/helpers.gd gap/complex.gd
+ echo 'LoadPackage("img"); DOC@IMG();' | @GAP_EXEC@ -r -q
(cd doc; git add *.html manual.pdf manual.css; git commit -m 'New html files'; git push github master:gh-pages)
checkblocks:
grep '<#GAPDoc' PackageInfo.g gap/*d | awk -F'"' '{print $$2}' | sort > @@-blocks
- grep '<#Include' doc/fr.xml | awk -F'"' '{print $$2}' | sort > @@-in
+ grep '<#Include' doc/img.xml | awk -F'"' '{print $$2}' | sort > @@-in
comm -3 @@-blocks @@-in
@rm @@-blocks @@-in
tarballs: .version doc
mkdir -p www
- tar -c -f - --exclude '*~' --exclude 'config.[ls]*' --exclude 'fr/Makefile*' --exclude .cvsignore --exclude autom4te.cache --exclude sandbox --exclude www --exclude bin --exclude 'extern/[a-z]*' --exclude CVS --exclude .version -C .. fr | (cd www; tar -x -f -)
- tar -c -f www/fr-`cat .version`.tar.gz -z -C www fr
- ln -sf fr-`cat .version`.tar.gz www/fr.tar.gz
+ tar -c -f - --exclude '*~' --exclude 'config.[ls]*' --exclude 'img/Makefile*' --exclude .cvsignore --exclude autom4te.cache --exclude sandbox --exclude www --exclude bin --exclude 'extern/[a-z]*' --exclude CVS --exclude .version -C .. img | (cd www; tar -x -f -)
+ tar -c -f www/img-`cat .version`.tar.gz -z -C www img
+ ln -sf img-`cat .version`.tar.gz www/img.tar.gz
-#E Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here
+#E Makefile.in . . . . . . . . . . . . . . . . . . . . . . . . . . ends here
View
4 cnf/aclocal.m4
@@ -65,8 +65,12 @@ AC_DEFUN([_AM_SUBST_NOTMAKE])
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+m4_include([m4/ac_check_cholmod.m4])
m4_include([m4/ac_check_levmar.m4])
+m4_include([m4/ac_check_libdogleg.m4])
m4_include([m4/ac_find_gap.m4])
+m4_include([m4/ac_prog_javac.m4])
+m4_include([m4/ac_prog_javac_works.m4])
m4_include([m4/ac_sys_is.m4])
m4_include([m4/ax_cc_maxopt.m4])
m4_include([m4/ax_check_compiler_flags.m4])
View
0  hurwitz/config.h.in → cnf/config.h.in
File renamed without changes
View
822 cnf/config.log
@@ -1,822 +0,0 @@
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by configure, which was
-generated by GNU Autoconf 2.69. Invocation command line was
-
- $ ./configure --with-gaproot=/usr/local/src/gap
-
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = Laurents-MacBook-Pro.local
-uname -m = x86_64
-uname -r = 12.2.0
-uname -s = Darwin
-uname -v = Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64
-
-/usr/bin/uname -p = i386
-/bin/uname -X = unknown
-
-/bin/arch = unknown
-/usr/bin/arch -k = unknown
-/usr/convex/getsysinfo = unknown
-/usr/bin/hostinfo = Mach kernel version:
- Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64
-Kernel configured for up to 8 processors.
-4 processors are physically available.
-8 processors are logically available.
-Processor type: i486 (Intel 80486)
-Processors active: 0 1 2 3 4 5 6 7
-Primary memory available: 16.00 gigabytes
-Default processor set: 123 tasks, 620 threads, 8 processors
-Load average: 2.00, Mach factor: 5.98
-/bin/machine = unknown
-/usr/bin/oslevel = unknown
-/bin/universe = unknown
-
-PATH: /Users/laurent/.../bin
-PATH: /usr/local/bin
-PATH: /usr/bin
-PATH: /bin
-PATH: /usr/sbin
-PATH: /sbin
-PATH: /usr/local/bin
-PATH: /opt/X11/bin
-PATH: /usr/texbin
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-configure:2255: checking build system type
-configure:2269: result: x86_64-apple-darwin12.2.0
-configure:2289: checking host system type
-configure:2302: result: x86_64-apple-darwin12.2.0
-configure:2343: checking how to print strings
-configure:2370: result: printf
-configure:2439: checking for gcc
-configure:2455: found /usr/bin/gcc
-configure:2466: result: gcc
-configure:2695: checking for C compiler version
-configure:2704: gcc --version >&5
-i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
-Copyright (C) 2007 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-configure:2715: $? = 0
-configure:2704: gcc -v >&5
-Using built-in specs.
-Target: i686-apple-darwin11
-Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
-Thread model: posix
-gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
-configure:2715: $? = 0
-configure:2704: gcc -V >&5
-llvm-gcc-4.2: argument to `-V' is missing
-configure:2715: $? = 1
-configure:2704: gcc -qversion >&5
-i686-apple-darwin11-llvm-gcc-4.2: no input files
-configure:2715: $? = 1
-configure:2735: checking whether the C compiler works
-configure:2757: gcc conftest.c >&5
-configure:2761: $? = 0
-configure:2809: result: yes
-configure:2812: checking for C compiler default output file name
-configure:2814: result: a.out
-configure:2820: checking for suffix of executables
-configure:2827: gcc -o conftest conftest.c >&5
-configure:2831: $? = 0
-configure:2853: result:
-configure:2875: checking whether we are cross compiling
-configure:2883: gcc -o conftest conftest.c >&5
-configure:2887: $? = 0
-configure:2894: ./conftest
-configure:2898: $? = 0
-configure:2913: result: no
-configure:2918: checking for suffix of object files
-configure:2940: gcc -c conftest.c >&5
-configure:2944: $? = 0
-configure:2965: result: o
-configure:2969: checking whether we are using the GNU C compiler
-configure:2988: gcc -c conftest.c >&5
-configure:2988: $? = 0
-configure:2997: result: yes
-configure:3006: checking whether gcc accepts -g
-configure:3026: gcc -c -g conftest.c >&5
-configure:3026: $? = 0
-configure:3067: result: yes
-configure:3084: checking for gcc option to accept ISO C89
-configure:3147: gcc -c -g -O2 conftest.c >&5
-configure:3147: $? = 0
-configure:3160: result: none needed
-configure:3180: checking for a sed that does not truncate output
-configure:3244: result: /usr/local/bin/gsed
-configure:3262: checking for grep that handles long lines and -e
-configure:3320: result: /usr/bin/grep
-configure:3325: checking for egrep
-configure:3387: result: /usr/bin/grep -E
-configure:3392: checking for fgrep
-configure:3454: result: /usr/bin/grep -F
-configure:3489: checking for ld used by gcc
-configure:3556: result: /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
-configure:3563: checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld
-configure:3578: result: no
-configure:3590: checking for BSD- or MS-compatible name lister (nm)
-configure:3639: result: /usr/bin/nm
-configure:3769: checking the name lister (/usr/bin/nm) interface
-configure:3776: gcc -c -g -O2 conftest.c >&5
-configure:3779: /usr/bin/nm "conftest.o"
-configure:3782: output
-0000000000000188 S _some_variable
-configure:3789: result: BSD nm
-configure:3792: checking whether ln -s works
-configure:3796: result: yes
-configure:3804: checking the maximum length of command line arguments
-configure:3934: result: 196608
-configure:3951: checking whether the shell understands some XSI constructs
-configure:3961: result: yes
-configure:3965: checking whether the shell understands "+="
-configure:3971: result: yes
-configure:4006: checking how to convert x86_64-apple-darwin12.2.0 file names to x86_64-apple-darwin12.2.0 format
-configure:4046: result: func_convert_file_noop
-configure:4053: checking how to convert x86_64-apple-darwin12.2.0 file names to toolchain format
-configure:4073: result: func_convert_file_noop
-configure:4080: checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld option to reload object files
-configure:4087: result: -r
-configure:4161: checking for objdump
-configure:4191: result: no
-configure:4217: checking how to recognize dependent libraries
-configure:4419: result: pass_all
-configure:4504: checking for dlltool
-configure:4534: result: no
-configure:4561: checking how to associate runtime and link libraries
-configure:4588: result: printf %s\n
-configure:4649: checking for ar
-configure:4665: found /usr/bin/ar
-configure:4676: result: ar
-configure:4713: checking for archiver @FILE support
-configure:4730: gcc -c -g -O2 conftest.c >&5
-configure:4730: $? = 0
-configure:4733: ar cru libconftest.a @conftest.lst >&5
-ar: @conftest.lst: No such file or directory
-configure:4736: $? = 1
-configure:4756: result: no
-configure:4814: checking for strip
-configure:4830: found /usr/bin/strip
-configure:4841: result: strip
-configure:4913: checking for ranlib
-configure:4929: found /usr/bin/ranlib
-configure:4940: result: ranlib
-configure:5017: checking for gawk
-configure:5047: result: no
-configure:5017: checking for mawk
-configure:5047: result: no
-configure:5017: checking for nawk
-configure:5047: result: no
-configure:5017: checking for awk
-configure:5033: found /usr/bin/awk
-configure:5044: result: awk
-configure:5084: checking command to parse /usr/bin/nm output from gcc object
-configure:5204: gcc -c -g -O2 conftest.c >&5
-configure:5207: $? = 0
-configure:5211: /usr/bin/nm conftest.o \| sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm
-configure:5214: $? = 0
-cannot find nm_test_var in conftest.nm
-configure:5204: gcc -c -g -O2 conftest.c >&5
-configure:5207: $? = 0
-configure:5211: /usr/bin/nm conftest.o \| sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm
-configure:5214: $? = 0
-configure:5280: gcc -o conftest -g -O2 conftest.c conftstm.o >&5
-configure:5283: $? = 0
-configure:5321: result: ok
-configure:5358: checking for sysroot
-configure:5388: result: no
-configure:5644: checking for mt
-configure:5674: result: no
-configure:5694: checking if : is a manifest tool
-configure:5700: : '-?'
-configure:5708: result: no
-configure:5764: checking for dsymutil
-configure:5780: found /usr/bin/dsymutil
-configure:5791: result: dsymutil
-configure:5856: checking for nmedit
-configure:5872: found /usr/bin/nmedit
-configure:5883: result: nmedit
-configure:5948: checking for lipo
-configure:5964: found /usr/bin/lipo
-configure:5975: result: lipo
-configure:6040: checking for otool
-configure:6056: found /usr/bin/otool
-configure:6067: result: otool
-configure:6132: checking for otool64
-configure:6162: result: no
-configure:6207: checking for -single_module linker flag
-gcc -g -O2 -o libconftest.dylib -dynamiclib -Wl,-single_module conftest.c
-configure:6240: result: yes
-configure:6243: checking for -exported_symbols_list linker flag
-configure:6263: gcc -o conftest -g -O2 -Wl,-exported_symbols_list,conftest.sym conftest.c >&5
-configure:6263: $? = 0
-configure:6273: result: yes
-configure:6276: checking for -force_load linker flag
-gcc -g -O2 -c -o conftest.o conftest.c
-ar cru libconftest.a conftest.o
-ranlib libconftest.a
-gcc -g -O2 -o conftest conftest.c -Wl,-force_load,./libconftest.a
-configure:6308: result: yes
-configure:6350: checking how to run the C preprocessor
-configure:6381: gcc -E conftest.c
-configure:6381: $? = 0
-configure:6395: gcc -E conftest.c
-conftest.c:9:28: error: ac_nonexistent.h: No such file or directory
-configure:6395: $? = 1
-configure: failed program was:
-| /* confdefs.h */
-| #define PACKAGE_NAME ""
-| #define PACKAGE_TARNAME ""
-| #define PACKAGE_VERSION ""
-| #define PACKAGE_STRING ""
-| #define PACKAGE_BUGREPORT ""
-| #define PACKAGE_URL ""
-| /* end confdefs.h. */
-| #include <ac_nonexistent.h>
-configure:6420: result: gcc -E
-configure:6440: gcc -E conftest.c
-configure:6440: $? = 0
-configure:6454: gcc -E conftest.c
-conftest.c:9:28: error: ac_nonexistent.h: No such file or directory
-configure:6454: $? = 1
-configure: failed program was:
-| /* confdefs.h */
-| #define PACKAGE_NAME ""
-| #define PACKAGE_TARNAME ""
-| #define PACKAGE_VERSION ""
-| #define PACKAGE_STRING ""
-| #define PACKAGE_BUGREPORT ""
-| #define PACKAGE_URL ""
-| /* end confdefs.h. */
-| #include <ac_nonexistent.h>
-configure:6483: checking for ANSI C header files
-configure:6503: gcc -c -g -O2 conftest.c >&5
-configure:6503: $? = 0
-configure:6576: gcc -o conftest -g -O2 conftest.c >&5
-configure:6576: $? = 0
-configure:6576: ./conftest
-configure:6576: $? = 0
-configure:6587: result: yes
-configure:6600: checking for sys/types.h
-configure:6600: gcc -c -g -O2 conftest.c >&5
-configure:6600: $? = 0
-configure:6600: result: yes
-configure:6600: checking for sys/stat.h
-configure:6600: gcc -c -g -O2 conftest.c >&5
-configure:6600: $? = 0
-configure:6600: result: yes
-configure:6600: checking for stdlib.h
-configure:6600: gcc -c -g -O2 conftest.c >&5
-configure:6600: $? = 0
-configure:6600: result: yes
-configure:6600: checking for string.h
-configure:6600: gcc -c -g -O2 conftest.c >&5
-configure:6600: $? = 0
-configure:6600: result: yes
-configure:6600: checking for memory.h
-configure:6600: gcc -c -g -O2 conftest.c >&5
-configure:6600: $? = 0
-configure:6600: result: yes
-configure:6600: checking for strings.h
-configure:6600: gcc -c -g -O2 conftest.c >&5
-configure:6600: $? = 0
-configure:6600: result: yes
-configure:6600: checking for inttypes.h
-configure:6600: gcc -c -g -O2 conftest.c >&5
-configure:6600: $? = 0
-configure:6600: result: yes
-configure:6600: checking for stdint.h
-configure:6600: gcc -c -g -O2 conftest.c >&5
-configure:6600: $? = 0
-configure:6600: result: yes
-configure:6600: checking for unistd.h
-configure:6600: gcc -c -g -O2 conftest.c >&5
-configure:6600: $? = 0
-configure:6600: result: yes
-configure:6614: checking for dlfcn.h
-configure:6614: gcc -c -g -O2 conftest.c >&5
-configure:6614: $? = 0
-configure:6614: result: yes
-configure:7116: checking for objdir
-configure:7131: result: .libs
-configure:7402: checking if gcc supports -fno-rtti -fno-exceptions
-configure:7420: gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5
-cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
-configure:7424: $? = 0
-configure:7437: result: no
-configure:7764: checking for gcc option to produce PIC
-configure:7771: result: -fno-common -DPIC
-configure:7779: checking if gcc PIC flag -fno-common -DPIC works
-configure:7797: gcc -c -g -O2 -fno-common -DPIC -DPIC conftest.c >&5
-configure:7801: $? = 0
-configure:7814: result: yes
-configure:7843: checking if gcc static flag -static works
-configure:7871: result: no
-configure:7886: checking if gcc supports -c -o file.o
-configure:7907: gcc -c -g -O2 -o out/conftest2.o conftest.c >&5
-configure:7911: $? = 0
-configure:7933: result: yes
-configure:7941: checking if gcc supports -c -o file.o
-configure:7988: result: yes
-configure:8021: checking whether the gcc linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries
-configure:9174: result: yes
-configure:9414: checking dynamic linker characteristics
-configure:10147: result: darwin12.2.0 dyld
-configure:10254: checking how to hardcode library paths into programs
-configure:10279: result: immediate
-configure:10324: checking for dlopen in -ldl
-configure:10349: gcc -o conftest -g -O2 conftest.c -ldl >&5
-configure:10349: $? = 0
-configure:10358: result: yes
-configure:10573: checking whether a program can dlopen itself
-configure:10653: gcc -o conftest -g -O2 -DHAVE_DLFCN_H conftest.c -ldl >&5
-configure:10656: $? = 0
-configure:10674: result: yes
-configure:10679: checking whether a statically linked program can dlopen itself
-configure:10759: gcc -o conftest -g -O2 -DHAVE_DLFCN_H conftest.c -ldl >&5
-configure:10762: $? = 0
-configure:10780: result: yes
-configure:10819: checking whether stripping libraries is possible
-configure:10833: result: yes
-configure:10859: checking if libtool supports shared libraries
-configure:10861: result: yes
-configure:10864: checking whether to build shared libraries
-configure:10885: result: yes
-configure:10888: checking whether to build static libraries
-configure:10892: result: no
-configure:10981: checking for gcc
-configure:11008: result: gcc
-configure:11237: checking for C compiler version
-configure:11246: gcc --version >&5
-i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
-Copyright (C) 2007 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-configure:11257: $? = 0
-configure:11246: gcc -v >&5
-Using built-in specs.
-Target: i686-apple-darwin11
-Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
-Thread model: posix
-gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
-configure:11257: $? = 0
-configure:11246: gcc -V >&5
-llvm-gcc-4.2: argument to `-V' is missing
-configure:11257: $? = 1
-configure:11246: gcc -qversion >&5
-i686-apple-darwin11-llvm-gcc-4.2: no input files
-configure:11257: $? = 1
-configure:11261: checking whether we are using the GNU C compiler
-configure:11289: result: yes
-configure:11298: checking whether gcc accepts -g
-configure:11359: result: yes
-configure:11376: checking for gcc option to accept ISO C89
-configure:11452: result: none needed
-configure:11473: checking for C compiler vendor
-configure:11497: gcc -c -g -O2 conftest.c >&5
-conftest.c: In function 'main':
-conftest.c:27: error: 'thisisanerror' undeclared (first use in this function)
-conftest.c:27: error: (Each undeclared identifier is reported only once
-conftest.c:27: error: for each function it appears in.)
-configure:11497: $? = 1
-configure: failed program was:
-| /* confdefs.h */
-| #define PACKAGE_NAME ""
-| #define PACKAGE_TARNAME ""
-| #define PACKAGE_VERSION ""
-| #define PACKAGE_STRING ""
-| #define PACKAGE_BUGREPORT ""
-| #define PACKAGE_URL ""
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DLFCN_H 1
-| #define LT_OBJDIR ".libs/"
-| /* end confdefs.h. */
-|
-| int
-| main ()
-| {
-|
-| #if !(defined(__ICC) || defined(__ECC) || defined(__INTEL_COMPILER))
-| thisisanerror;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:11497: gcc -c -g -O2 conftest.c >&5
-conftest.c: In function 'main':
-conftest.c:27: error: 'thisisanerror' undeclared (first use in this function)
-conftest.c:27: error: (Each undeclared identifier is reported only once
-conftest.c:27: error: for each function it appears in.)
-configure:11497: $? = 1
-configure: failed program was:
-| /* confdefs.h */
-| #define PACKAGE_NAME ""
-| #define PACKAGE_TARNAME ""
-| #define PACKAGE_VERSION ""
-| #define PACKAGE_STRING ""
-| #define PACKAGE_BUGREPORT ""
-| #define PACKAGE_URL ""
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DLFCN_H 1
-| #define LT_OBJDIR ".libs/"
-| /* end confdefs.h. */
-|
-| int
-| main ()
-| {
-|
-| #if !(defined(__xlc__) || defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__))
-| thisisanerror;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:11497: gcc -c -g -O2 conftest.c >&5
-conftest.c: In function 'main':
-conftest.c:27: error: 'thisisanerror' undeclared (first use in this function)
-conftest.c:27: error: (Each undeclared identifier is reported only once
-conftest.c:27: error: for each function it appears in.)
-configure:11497: $? = 1
-configure: failed program was:
-| /* confdefs.h */
-| #define PACKAGE_NAME ""
-| #define PACKAGE_TARNAME ""
-| #define PACKAGE_VERSION ""
-| #define PACKAGE_STRING ""
-| #define PACKAGE_BUGREPORT ""
-| #define PACKAGE_URL ""
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DLFCN_H 1
-| #define LT_OBJDIR ".libs/"
-| /* end confdefs.h. */
-|
-| int
-| main ()
-| {
-|
-| #if !(defined(__PATHCC__) || defined(__PATHSCALE__))
-| thisisanerror;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:11497: gcc -c -g -O2 conftest.c >&5
-configure:11497: $? = 0
-configure:11504: result: gnu
-configure:12332: checking for ANSI C header files
-configure:12436: result: yes
-configure:12447: checking float.h usability
-configure:12447: gcc -c -g -O2 conftest.c >&5
-configure:12447: $? = 0
-configure:12447: result: yes
-configure:12447: checking float.h presence
-configure:12447: gcc -E conftest.c
-configure:12447: $? = 0
-configure:12447: result: yes
-configure:12447: checking for float.h
-configure:12447: result: yes
-configure:12447: checking for stdlib.h
-configure:12447: result: yes
-configure:12459: checking for an ANSI C-conforming const
-configure:12525: gcc -c -g -O2 conftest.c >&5
-configure:12525: $? = 0
-configure:12532: result: yes
-configure:12540: checking for inline
-configure:12556: gcc -c -g -O2 conftest.c >&5
-configure:12556: $? = 0
-configure:12564: result: inline
-configure:12598: checking for CONFIGNAME
-configure:12604: result: none
-configure:12616: checking for GAP root directory
-configure:12642: result: /usr/local/src/gap
-configure:12667: checking for GAP architecture
-configure:12681: result: x86_64-apple-darwin12.2.0-gcc-default64
-configure:12704: WARNING: The guessed target -gcc-default64 is not the gap target x86_64-apple-darwin12.2.0-gcc-default64. Cross your fingers
-configure:12713: checking for GAP include files
-configure:12716: result: /usr/local/src/gap/src/compiled.h
-configure:12723: checking for GAP config.h
-configure:12726: result: /usr/local/src/gap/bin/x86_64-apple-darwin12.2.0-gcc-default64/config.h
-configure:12759: checking for GAP's gmp.h location
-configure:12770: result: /usr/local/include/gmp.h
-configure:12872: checking gsl/gsl_vector.h usability
-configure:12872: gcc -c -g -O2 conftest.c >&5
-configure:12872: $? = 0
-configure:12872: result: yes
-configure:12872: checking gsl/gsl_vector.h presence
-configure:12872: gcc -E conftest.c
-configure:12872: $? = 0
-configure:12872: result: yes
-configure:12872: checking for gsl/gsl_vector.h
-configure:12872: result: yes
-configure:12880: checking for gsl_multiroot_fsolver_set in -lgsl
-configure:12905: gcc -o conftest -g -O2 conftest.c -lgsl -lgslcblas >&5
-configure:12905: $? = 0
-configure:12914: result: yes
-configure:12927: checking for cblas_ctrmv in -lgslcblas
-configure:12952: gcc -o conftest -g -O2 conftest.c -lgslcblas -lgsl >&5
-configure:12952: $? = 0
-configure:12961: result: yes
-configure:12989: checking for dot
-configure:13007: found /usr/local/bin/dot
-configure:13019: result: /usr/local/bin/dot
-configure:13038: checking for display
-configure:13056: found /usr/local/bin/display
-configure:13068: result: /usr/local/bin/display
-configure:13084: checking for appletviewer
-configure:13102: found /usr/bin/appletviewer
-configure:13114: result: /usr/bin/appletviewer
-configure:13133: checking for javac
-configure:13149: found /usr/bin/javac
-configure:13160: result: javac
-configure:13354: creating bin//config.status
-
-## ---------------------- ##
-## Running config.status. ##
-## ---------------------- ##
-
-This file was extended by config.status, which was
-generated by GNU Autoconf 2.69. Invocation command line was
-
- CONFIG_FILES =
- CONFIG_HEADERS =
- CONFIG_LINKS =
- CONFIG_COMMANDS =
- $ bin//config.status
-
-on Laurents-MacBook-Pro.local
-
-config.status:976: creating
-config.status:1118: error: could not create
-
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-
-ac_cv_build=x86_64-apple-darwin12.2.0
-ac_cv_c_compiler_gnu=yes
-ac_cv_c_const=yes
-ac_cv_c_inline=inline
-ac_cv_env_CC_set=
-ac_cv_env_CC_value=
-ac_cv_env_CFLAGS_set=
-ac_cv_env_CFLAGS_value=
-ac_cv_env_CONFIGNAME_set=
-ac_cv_env_CONFIGNAME_value=
-ac_cv_env_CPPFLAGS_set=
-ac_cv_env_CPPFLAGS_value=
-ac_cv_env_CPP_set=
-ac_cv_env_CPP_value=
-ac_cv_env_LDFLAGS_set=
-ac_cv_env_LDFLAGS_value=
-ac_cv_env_LIBS_set=
-ac_cv_env_LIBS_value=
-ac_cv_env_build_alias_set=
-ac_cv_env_build_alias_value=
-ac_cv_env_host_alias_set=
-ac_cv_env_host_alias_value=
-ac_cv_env_target_alias_set=
-ac_cv_env_target_alias_value=
-ac_cv_header_dlfcn_h=yes
-ac_cv_header_float_h=yes
-ac_cv_header_gsl_gsl_vector_h=yes
-ac_cv_header_inttypes_h=yes
-ac_cv_header_memory_h=yes
-ac_cv_header_stdc=yes
-ac_cv_header_stdint_h=yes
-ac_cv_header_stdlib_h=yes
-ac_cv_header_string_h=yes
-ac_cv_header_strings_h=yes
-ac_cv_header_sys_stat_h=yes
-ac_cv_header_sys_types_h=yes
-ac_cv_header_unistd_h=yes
-ac_cv_host=x86_64-apple-darwin12.2.0
-ac_cv_lib_dl_dlopen=yes
-ac_cv_lib_gsl_gsl_multiroot_fsolver_set=yes
-ac_cv_lib_gslcblas_cblas_ctrmv=yes
-ac_cv_objext=o
-ac_cv_path_APPLETVIEWER=/usr/bin/appletviewer
-ac_cv_path_DISP=/usr/local/bin/display
-ac_cv_path_DOT=/usr/local/bin/dot
-ac_cv_path_EGREP='/usr/bin/grep -E'
-ac_cv_path_FGREP='/usr/bin/grep -F'
-ac_cv_path_GREP=/usr/bin/grep
-ac_cv_path_SED=/usr/local/bin/gsed
-ac_cv_prog_AWK=awk
-ac_cv_prog_CPP='gcc -E'
-ac_cv_prog_JAVAC=javac
-ac_cv_prog_ac_ct_AR=ar
-ac_cv_prog_ac_ct_CC=gcc
-ac_cv_prog_ac_ct_DSYMUTIL=dsymutil
-ac_cv_prog_ac_ct_LIPO=lipo
-ac_cv_prog_ac_ct_NMEDIT=nmedit
-ac_cv_prog_ac_ct_OTOOL=otool
-ac_cv_prog_ac_ct_RANLIB=ranlib
-ac_cv_prog_ac_ct_STRIP=strip
-ac_cv_prog_cc_c89=
-ac_cv_prog_cc_g=yes
-ax_cv_c_compiler_vendor=gnu
-lt_cv_apple_cc_single_mod=yes
-lt_cv_ar_at_file=no
-lt_cv_deplibs_check_method=pass_all
-lt_cv_dlopen=dlopen
-lt_cv_dlopen_libs=-ldl
-lt_cv_dlopen_self=yes
-lt_cv_dlopen_self_static=yes
-lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_ld_exported_symbols_list=yes
-lt_cv_ld_force_load=yes
-lt_cv_ld_reload_flag=-r
-lt_cv_nm_interface='BSD nm'
-lt_cv_objdir=.libs
-lt_cv_path_LD=/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
-lt_cv_path_NM=/usr/bin/nm
-lt_cv_path_mainfest_tool=no
-lt_cv_prog_compiler_c_o=yes
-lt_cv_prog_compiler_pic='-fno-common -DPIC'
-lt_cv_prog_compiler_pic_works=yes
-lt_cv_prog_compiler_rtti_exceptions=no
-lt_cv_prog_compiler_static_works=no
-lt_cv_prog_gnu_ld=no
-lt_cv_sharedlib_from_linklib_cmd='printf %s\n'
-lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p'\'' | sed '\''/ __gnu_lto/d'\'''
-lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[BCDEGRST]* \([^ ]*\) \([^ ]*\)$/ {"\2", (void *) \&\2},/p'\'''
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[BCDEGRST]* \([^ ]*\) \(lib[^ ]*\)$/ {"\2", (void *) \&\2},/p'\'' -e '\''s/^[BCDEGRST]* \([^ ]*\) \([^ ]*\)$/ {"lib\2", (void *) \&\2},/p'\'''
-lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[BCDEGRST]* .* \(.*\)$/extern char \1;/p'\'''
-lt_cv_sys_max_cmd_len=196608
-lt_cv_to_host_file_cmd=func_convert_file_noop
-lt_cv_to_tool_file_cmd=func_convert_file_noop
-
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-
-APPLETVIEWER='/usr/bin/appletviewer'
-AR='ar'
-AS='as'
-AWK='awk'
-CC='gcc'
-CFLAGS='-g -O2'
-CONFIGNAME=''
-CPP='gcc -E'
-CPPFLAGS=''
-DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -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_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FLOAT_H=1 -DHAVE_STDLIB_H=1 -DSYS_IS_CYGWIN32=0 -DSYS_IS_DARWIN=1 -DHAVE_LIBGSL=1 -DHAVE_LIBGSLCBLAS=1'
-DISP='/usr/local/bin/display'
-DLLTOOL='false'
-DOT='/usr/local/bin/dot'
-DSYMUTIL='dsymutil'
-DUMPBIN=''
-ECHO_C='\c'
-ECHO_N=''
-ECHO_T=''
-EGREP='/usr/bin/grep -E'
-EXEEXT=''
-FGREP='/usr/bin/grep -F'
-GAPARCH='x86_64-apple-darwin12.2.0-gcc-default64'
-GAPROOT='/usr/local/src/gap'
-GAP_CPPFLAGS='-I/usr/local/src/gap -I/usr/local/src/gap/bin/x86_64-apple-darwin12.2.0-gcc-default64 -I/usr/local/include'
-GMP_ROOT='/usr/local'
-GREP='/usr/bin/grep'
-JAVABUILD='java/javaplot.class java/javaview.jar'
-JAVAC='javac'
-LD='/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld'
-LDFLAGS=''
-LIBOBJS=''
-LIBS='-lgslcblas -lgsl -lgsl -lgslcblas'
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-LIB_TARGET=''
-LIPO='lipo'
-LN_S='ln -s'
-LTLIBOBJS=''
-MANIFEST_TOOL=':'
-NM='/usr/bin/nm'
-NMEDIT='nmedit'
-OBJDUMP='false'
-OBJEXT='o'
-OTOOL64=':'
-OTOOL='otool'
-PACKAGE_BUGREPORT=''
-PACKAGE_NAME=''
-PACKAGE_STRING=''
-PACKAGE_TARNAME=''
-PACKAGE_URL=''
-PACKAGE_VERSION=''
-PATH_SEPARATOR=':'
-PRTDIAG=''
-RANLIB='ranlib'
-SED='/usr/local/bin/gsed'
-SHELL='/bin/sh'
-STRIP='strip'
-SYS_IS_CYGWIN_FALSE=''
-SYS_IS_CYGWIN_TRUE='#'
-ac_ct_AR='ar'
-ac_ct_CC='gcc'
-ac_ct_DUMPBIN=''
-bindir='${exec_prefix}/bin'
-build='x86_64-apple-darwin12.2.0'
-build_alias=''
-build_cpu='x86_64'
-build_os='darwin12.2.0'
-build_vendor='apple'
-datadir='${datarootdir}'
-datarootdir='${prefix}/share'
-docdir='${datarootdir}/doc/${PACKAGE}'
-dvidir='${docdir}'
-exec_prefix='${prefix}'
-host='x86_64-apple-darwin12.2.0'
-host_alias=''
-host_cpu='x86_64'
-host_os='darwin12.2.0'
-host_vendor='apple'
-htmldir='${docdir}'
-includedir='${prefix}/include'
-infodir='${datarootdir}/info'
-libdir='${exec_prefix}/lib'
-libexecdir='${exec_prefix}/libexec'
-localedir='${datarootdir}/locale'
-localstatedir='${prefix}/var'
-mandir='${datarootdir}/man'
-oldincludedir='/usr/include'
-pdfdir='${docdir}'
-prefix='/Users/laurent/math/GAP/fr/cnf'
-program_transform_name='s,x,x,'
-psdir='${docdir}'
-sbindir='${exec_prefix}/sbin'
-sharedstatedir='${prefix}/com'
-subdirs=' hurwitz'
-sysconfdir='${prefix}/etc'
-target_alias=''
-
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-
-/* confdefs.h */
-#define PACKAGE_NAME ""
-#define PACKAGE_TARNAME ""
-#define PACKAGE_VERSION ""
-#define PACKAGE_STRING ""
-#define PACKAGE_BUGREPORT ""
-#define PACKAGE_URL ""
-#define STDC_HEADERS 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRING_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_STRINGS_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_UNISTD_H 1
-#define HAVE_DLFCN_H 1
-#define LT_OBJDIR ".libs/"
-#define STDC_HEADERS 1
-#define HAVE_FLOAT_H 1
-#define HAVE_STDLIB_H 1
-#define SYS_IS_CYGWIN32 0
-#define SYS_IS_DARWIN 1
-#define HAVE_LIBGSL 1
-#define HAVE_LIBGSLCBLAS 1
-
-configure: exit 1
View
50 cnf/configure.ac
@@ -11,15 +11,19 @@
AC_PREREQ(2.68)
LT_PREREQ([2.4.2])
AC_INIT(fr,,laurent.bartholdi@gmail.com)
-AC_CONFIG_SRCDIR([src/fr_dll.c])
+AC_CONFIG_SRCDIR([src/img_dll.c])
AC_CONFIG_AUX_DIR([cnf])
AC_CONFIG_MACRO_DIR([cnf/m4])
+AC_CONFIG_HEADERS([src/config.h:cnf/config.h.in])
LT_INIT([disable-static dlopen win32-dll])
AC_PREFIX_DEFAULT([${PWD}])
# Checks for programs.
AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_JAVAC
+AC_CANONICAL_TARGET
AX_CC_MAXOPT
# Checks for header files.
@@ -30,33 +34,27 @@ AC_CHECK_HEADERS([float.h stdlib.h])
AC_C_CONST
AC_C_INLINE
+# Checks for standard C++ stuff
+AC_CHECK_HEADERS(malloc/malloc.h)
+AC_CHECK_HEADERS(malloc.h)
+
+AC_CHECK_LIB(m,sincos,AC_DEFINE(HAVE_SINCOS,1,do we have sincos?))
+
# Locates GAP
AC_FIND_GAP
AC_SYS_IS_CYGWIN
AC_SYS_IS_DARWIN
-################################################################
-# external libraries configuration
+# External libraries configuration
EXTERN="\$(CURDIR)/bin/$TARGET/extern"
-LIB_TARGET=""
+MAKE_LIBTARGETS=""
AC_CHECK_LEVMAR
+AC_CHECK_CHOLMOD
+AC_CHECK_LIBDOGLEG
-################################################################
-# external programs configuration
-
-AC_PATH_PROGS(DOT,[dot],[],[$PATH$PATH_SEPARATOR/usr/local/graphviz/bin])
-
-if test -z "$DOT"; then
- AC_WARN([Could not find 'dot' (debian package graphviz)... you won't be able to draw automata])
-fi
-
-AC_PATH_PROG(DISP,[display])
-
-if test -z "$DISP"; then
- AC_WARN([Could not find 'display' (debian package imagemagick)... you won't be able to draw automata])
-fi
+# External programs configuration
AC_PATH_PROG(APPLETVIEWER,[appletviewer])
@@ -64,30 +62,16 @@ if test -z "$APPLETVIEWER"; then
AC_WARN([Could not find 'appletviewer' (debian package java-6-sdk)... you won't be able to draw spiders])
fi
-# Check for java compiler
-AC_CHECK_PROGS(JAVAC,[javac])
-
-if test -z "$JAVAC"; then
- AC_WARN([Could not find java compiler... you won't be able to draw spiders])
-else
- JAVABUILD="java/javaplot.class java/javaview.jar"
-fi
-AC_SUBST(JAVABUILD)
-AC_SUBST(LIBS)
-AC_SUBST(LIB_TARGET)
-
################################################################
# generate files
mkdir -p bin/$GAPARCH
CONFIG_STATUS=bin/$GAPARCH/config.status
-AC_CONFIG_FILES([$GAP_MAKEFILE:cnf/Makefile.in])
+AC_CONFIG_FILES([$GAP_MAKEFILE:cnf/Makefile.in bin/$GAPARCH/files.g:cnf/files.g.in])
if test "$GAP_MAKEFILE" != Makefile; then
ln -sf "$GAP_MAKEFILE" Makefile
fi
-AC_CONFIG_SUBDIRS(hurwitz)
-
AC_OUTPUT
View
1  cnf/files.g.in
@@ -0,0 +1 @@
+EXEC@IMG.appletviewer := "@APPLETVIEWER@";
View
47 cnf/m4/ac_check_cholmod.m4
@@ -0,0 +1,47 @@
+# check for cholmod library
+# sets the CHOLMOD_CFLAGS, CHOLMOD_LDFLAGS and CHOLMOD_LIBS appropriately
+
+AC_DEFUN([AC_CHECK_CHOLMOD],[
+
+cm_LIBS="$LIBS"
+
+AC_ARG_WITH(cholmod,
+ [ --with-cholmod=<location>
+ Location at which the cholmod library, needed for layout, was installed.],
+ [CHOLMOD_CFLAGS="-I$withval/include"; CHOLMODLIB="$withval/lib"]
+)
+
+AC_ARG_WITH(cholmod-include,
+ [ --with-cholmod-include=<location>
+ Location at which the cholmod include files were installed.],
+ [CHOLMOD_CFLAGS="-I$withval"]
+)
+
+AC_ARG_WITH(cholmod-lib,
+ [ --with-cholmod-lib=<location>
+ Location at which the cholmod library files were installed.
+ ],
+ [CHOLMODLIB="$withval"]
+)
+
+AC_CHECK_HEADER(suitesparse/cholmod.h,[CHOLMOD_CFLAGS="-I/usr/include/suitesparse"])
+
+if test "$CHOLMOD_CFLAGS" != ""; then
+ CPPFLAGS="$CPPFLAGS $CHOLMOD_CFLAGS"
+fi
+
+AC_CHECK_HEADER(cholmod.h,,AC_MSG_ERROR([cholmod.h not found. Specify its location using --with-cholmod.]))
+
+if test "$CHOLMODLIB" != ""; then
+ LDFLAGS="$LDFLAGS -L$CHOLMODLIB"
+ CHOLMOD_LDFLAGS="-L$CHOLMODLIB"
+fi
+AC_CHECK_LIB(cholmod,cholmod_allocate_triplet,,AC_MSG_ERROR([libcholmod not found. Specify its location using --with-cholmod.]),[-llapack -lcolamd -lsuitesparseconfig -lamd -lrt])
+
+CHOLMOD_LIBS="-lcholmod -llapack -lcolamd -lsuitesparseconfig -lamd -lrt"
+
+LIBS="$cm_LIBS"
+AC_SUBST(CHOLMOD_CFLAGS)
+AC_SUBST(CHOLMOD_LDFLAGS)
+AC_SUBST(CHOLMOD_LIBS)
+])
View
36 cnf/m4/ac_check_levmar.m4
@@ -2,11 +2,20 @@
# sets the LEVMAR_CFLAGS, LEVMAR_LDFLAGS and LEVMAR_LIBS appropriately
AC_DEFUN([AC_CHECK_LEVMAR],[
+lm_LIBS="$LIBS"
+
+LEVMAR=yes
+LEVMAR_CFLAGS=""
+LEVMAR_LDFLAGS=""
AC_ARG_WITH(levmar,
[ --with-levmar=<location>
Location at which the levmar library, needed for layout, was installed.],
- [LEVMAR_CFLAGS="-I$withval/include"; LEVMAR_LDFLAGS="-L$withval/lib"]
+ [if test "$withval" = extern -o "$withval" = yes -o "$withval" = no; then
+ LEVMAR="$withval"
+ else
+ LEVMAR_CFLAGS="-I$withval/include"; LEVMAR_LDFLAGS="-L$withval/lib"
+ fi]
)
AC_ARG_WITH(levmar-include,
@@ -24,6 +33,26 @@ AC_ARG_WITH(levmar-lib,
LEVMAR_LIBS="-llevmar -llapack -lblas"
+if test "$LEVMAR" = extern; then
+
+AC_MSG_CHECKING([for levmar])
+AC_MSG_RESULT([extern])
+LEVMAR_MAKELIB=`printf 'liblevmar:
+ mkdir -p $(EXTERN)/include $(EXTERN)/lib
+ if [[ ! -f $(EXTERN)/include/levmar.h ]]; then \\
+ cmake $(LEVMAR); \\
+ $(MAKE) -C $(LEVMAR) levmar C_FLAGS=-fPIC; \\
+ cp $(LEVMAR)/liblevmar.a $(EXTERN)/lib/; \\
+ cp $(LEVMAR)/levmar.h $(EXTERN)/include/; \\
+ fi\n'`
+
+MAKE_LIBTARGETS="$MAKE_LIBTARGETS liblevmar"
+
+LEVMAR_CFLAGS='-I$(EXTERN)/include'
+LEVMAR_LDFLAGS='-L$(EXTERN)/lib'
+
+elif test "$LEVMAR" != no; then
+
AC_LANG_PUSH([C])
lm_CPPFLAGS=$CPPFLAGS
@@ -39,7 +68,12 @@ LDFLAGS=$lm_LDFLAGS
AC_LANG_POP([C])
+fi
+
+LIBS="$lm_LIBS"
AC_SUBST(LEVMAR_CFLAGS)
AC_SUBST(LEVMAR_LDFLAGS)
AC_SUBST(LEVMAR_LIBS)
+AC_SUBST(LEVMAR_MAKELIB)
+AC_SUBST(MAKE_LIBTARGETS)
])
View
71 cnf/m4/ac_check_libdogleg.m4
@@ -0,0 +1,71 @@
+# check for libdogleg library
+# sets the LIBDOGLEG_CFLAGS, LIBDOGLEG_LDFLAGS and LIBDOGLEG_LIBS appropriately
+
+AC_DEFUN([AC_CHECK_LIBDOGLEG],[
+
+extern_libs=false
+AC_ARG_WITH(libdogleg,
+ [ --with-libdogleg=<location>
+ Location at which the libdogleg library, needed for layout, was installed.],
+ [if test "$withval" = extern; then
+ extern_libs=true
+ else
+ LIBDOGLEG_CFLAGS="-I$withval/include"; LIBDOGLEG_LDFLAGS="-L$withval/lib"
+ fi]
+)
+
+AC_ARG_WITH(libdogleg-include,
+ [ --with-libdogleg-include=<location>
+ Location at which the libdogleg include files were installed.],
+ [LIBDOGLEG_CFLAGS="-I$withval"]
+)
+
+AC_ARG_WITH(libdogleg-lib,
+ [ --with-libdogleg-lib=<location>
+ Location at which the libdogleg library files were installed.
+ ],
+ [LIBDOGLEG_LDFLAGS="-L$withval"]
+)
+
+LIBDOGLEG_LIBS="-lcholmod -ldogleg"
+
+if test "$extern_libs" = true; then
+AC_MSG_CHECKING([for libdogleg])
+AC_MSG_RESULT([extern])
+LIBDOGLEG_MAKELIB=`printf 'libdogleg:
+ mkdir -p $(EXTERN)/include $(EXTERN)/lib
+ if [[ ! -f $(EXTERN)/include/dogleg.h ]]; then \\
+ $(MAKE) -B -C $(LIBDOGLEG); \\
+ cp $(LIBDOGLEG)/libdogleg.* $(EXTERN)/lib/; \\
+ cp $(LIBDOGLEG)/dogleg.h $(EXTERN)/include/; \\
+ fi\n'`
+
+MAKE_LIBTARGETS="$MAKE_LIBTARGETS libdogleg"
+LIBDOGLEG_CFLAGS='-I$(EXTERN)/include'
+LIBDOGLEG_LDFLAGS='-L$(EXTERN)/lib'
+
+else
+
+AC_LANG_PUSH([C])
+
+ldl_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $LIBDOGLEG_CFLAGS"
+AC_CHECK_HEADER(dogleg.h,,AC_MSG_ERROR([dogleg.h not found. Specify its location using --with-libdogleg.
+The package may be downloaded from https://github.com/Oblong/libdogleg.git]))
+CPPFLAGS=$ldl_CPPFLAGS
+
+ldl_LDFLAGS=$LDFLAGS
+LDFLAGS="$LDFLAGS $LIBDOGLEG_LDFLAGS"
+AC_CHECK_LIB(dogleg,dogleg_optimize,,AC_MSG_ERROR([libdogleg not found. Specify its location using --with-libdogleg.]))
+LDFLAGS=$ldl_LDFLAGS
+
+AC_LANG_POP([C])
+
+fi
+
+AC_SUBST(LIBDOGLEG_CFLAGS)
+AC_SUBST(LIBDOGLEG_LDFLAGS)
+AC_SUBST(LIBDOGLEG_LIBS)
+AC_SUBST(LIBDOGLEG_MAKELIB)
+AC_SUBST(MAKE_LIBTARGETS)
+])
View
45 cnf/m4/ac_prog_javac.m4
@@ -0,0 +1,45 @@
+dnl @synopsis AC_PROG_JAVAC
+dnl
+dnl AC_PROG_JAVAC tests an existing Java compiler. It uses the
+dnl environment variable JAVAC then tests in sequence various common
+dnl Java compilers. For political reasons, it starts with the free
+dnl ones.
+dnl
+dnl If you want to force a specific compiler:
+dnl
+dnl - at the configure.in level, set JAVAC=yourcompiler before calling
+dnl AC_PROG_JAVAC
+dnl
+dnl - at the configure level, setenv JAVAC
+dnl
+dnl You can use the JAVAC variable in your Makefile.in, with @JAVAC@.
+dnl
+dnl *Warning*: its success or failure can depend on a proper setting of
+dnl the CLASSPATH env. variable.
+dnl
+dnl TODO: allow to exclude compilers (rationale: most Java programs
+dnl cannot compile with some compilers like guavac).
+dnl
+dnl Note: This is part of the set of autoconf M4 macros for Java
+dnl programs. It is VERY IMPORTANT that you download the whole set,
+dnl some macros depend on other. Unfortunately, the autoconf archive
+dnl does not support the concept of set of macros, so I had to break it
+dnl for submission. The general documentation, as well as the sample
+dnl configure.in, is included in the AC_PROG_JAVA macro.
+dnl
+dnl @category Java
+dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
+dnl @version 2000-07-19
+dnl @license GPLWithACException
+
+AC_DEFUN([AC_PROG_JAVAC],[
+AC_REQUIRE([AC_EXEEXT])dnl
+if test "x$JAVAPREFIX" = x; then
+ test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT)
+else
+ test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT, $JAVAPREFIX)
+fi
+test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])
+AC_PROG_JAVAC_WORKS
+AC_PROVIDE([$0])dnl
+])
View
36 cnf/m4/ac_prog_javac_works.m4
@@ -0,0 +1,36 @@
+dnl @synopsis AC_PROG_JAVAC_WORKS
+dnl
+dnl Internal use ONLY.
+dnl
+dnl Note: This is part of the set of autoconf M4 macros for Java
+dnl programs. It is VERY IMPORTANT that you download the whole set,
+dnl some macros depend on other. Unfortunately, the autoconf archive
+dnl does not support the concept of set of macros, so I had to break it
+dnl for submission. The general documentation, as well as the sample
+dnl configure.in, is included in the AC_PROG_JAVA macro.
+dnl
+dnl @category Java
+dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
+dnl @version 2000-07-19
+dnl @license GPLWithACException
+
+AC_DEFUN([AC_PROG_JAVAC_WORKS],[
+AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
+JAVA_TEST=Test.java
+CLASS_TEST=Test.class
+cat << \EOF > $JAVA_TEST
+/* [#]line __oline__ "configure" */
+public class Test {
+}
+EOF
+if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then
+ ac_cv_prog_javac_works=yes
+else
+ AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)])
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat $JAVA_TEST >&AC_FD_CC
+fi
+rm -f $JAVA_TEST $CLASS_TEST
+])
+AC_PROVIDE([$0])dnl
+])
View
5,000 configure
4,606 additions, 394 deletions not shown
View
5 extern/GET_LIBRARIES
@@ -1,5 +0,0 @@
-FR requires external libraries for its DLL. The compilation script will
-download them automatically for you; they can also be fetched manually,
-using the commands
-
-wget http://ftpmirror.gnu.org/gsl/gsl-1.15.tar.gz
View
75 extern/levmar-2.6/Axb.c
@@ -0,0 +1,75 @@
+/////////////////////////////////////////////////////////////////////////////////
+//
+// Solution of linear systems involved in the Levenberg - Marquardt
+// minimization algorithm
+// Copyright (C) 2004 Manolis Lourakis (lourakis at ics forth gr)
+// Institute of Computer Science, Foundation for Research & Technology - Hellas
+// Heraklion, Crete, Greece.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+/////////////////////////////////////////////////////////////////////////////////
+
+/********************************************************************************
+ * LAPACK-based implementations for various linear system solvers. The same core
+ * code is used with appropriate #defines to derive single and double precision
+ * solver versions, see also Axb_core.c
+ ********************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#include "levmar.h"
+#include "misc.h"
+
+#if !defined(LM_DBL_PREC) && !defined(LM_SNGL_PREC)
+#error At least one of LM_DBL_PREC, LM_SNGL_PREC should be defined!
+#endif
+
+
+#ifdef LM_DBL_PREC
+/* double precision definitions */
+#define LM_REAL double
+#define LM_PREFIX d
+#define LM_CNST(x) (x)
+#ifndef HAVE_LAPACK
+#include <float.h>
+#define LM_REAL_EPSILON DBL_EPSILON
+#endif
+
+#include "Axb_core.c"
+
+#undef LM_REAL
+#undef LM_PREFIX
+#undef LM_CNST
+#undef LM_REAL_EPSILON
+#endif /* LM_DBL_PREC */
+
+#ifdef LM_SNGL_PREC
+/* single precision (float) definitions */
+#define LM_REAL float
+#define LM_PREFIX s
+#define __SUBCNST(x) x##F
+#define LM_CNST(x) __SUBCNST(x) // force substitution
+#ifndef HAVE_LAPACK
+#define LM_REAL_EPSILON FLT_EPSILON
+#endif
+
+#include "Axb_core.c"
+
+#undef LM_REAL
+#undef LM_PREFIX
+#undef __SUBCNST
+#undef LM_CNST
+#undef LM_REAL_EPSILON
+#endif /* LM_SNGL_PREC */
View
1,282 extern/levmar-2.6/Axb_core.c
@@ -0,0 +1,1282 @@
+/////////////////////////////////////////////////////////////////////////////////
+//
+// Solution of linear systems involved in the Levenberg - Marquardt
+// minimization algorithm
+// Copyright (C) 2004 Manolis Lourakis (lourakis at ics forth gr)
+// Institute of Computer Science, Foundation for Research & Technology - Hellas
+// Heraklion, Crete, Greece.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+/////////////////////////////////////////////////////////////////////////////////
+
+
+/* Solvers for the linear systems Ax=b. Solvers should NOT modify their A & B arguments! */
+
+
+#ifndef LM_REAL // not included by Axb.c
+#error This file should not be compiled directly!
+#endif
+
+
+#ifdef LINSOLVERS_RETAIN_MEMORY
+#define __STATIC__ static
+#else
+#define __STATIC__ // empty
+#endif /* LINSOLVERS_RETAIN_MEMORY */
+
+#ifdef HAVE_LAPACK
+
+/* prototypes of LAPACK routines */
+
+#define GEQRF LM_MK_LAPACK_NAME(geqrf)
+#define ORGQR LM_MK_LAPACK_NAME(orgqr)
+#define TRTRS LM_MK_LAPACK_NAME(trtrs)
+#define POTF2 LM_MK_LAPACK_NAME(potf2)
+#define POTRF LM_MK_LAPACK_NAME(potrf)
+#define POTRS LM_MK_LAPACK_NAME(potrs)
+#define GETRF LM_MK_LAPACK_NAME(getrf)
+#define GETRS LM_MK_LAPACK_NAME(getrs)
+#define GESVD LM_MK_LAPACK_NAME(gesvd)
+#define GESDD LM_MK_LAPACK_NAME(gesdd)
+#define SYTRF LM_MK_LAPACK_NAME(sytrf)
+#define SYTRS LM_MK_LAPACK_NAME(sytrs)
+#define PLASMA_POSV LM_CAT_(PLASMA_, LM_ADD_PREFIX(posv))
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/* QR decomposition */
+extern int GEQRF(int *m, int *n, LM_REAL *a, int *lda, LM_REAL *tau, LM_REAL *work, int *lwork, int *info);
+extern int ORGQR(int *m, int *n, int *k, LM_REAL *a, int *lda, LM_REAL *tau, LM_REAL *work, int *lwork, int *info);
+
+/* solution of triangular systems */
+extern int TRTRS(char *uplo, char *trans, char *diag, int *n, int *nrhs, LM_REAL *a, int *lda, LM_REAL *b, int *ldb, int *info);
+
+/* Cholesky decomposition and systems solution */
+extern int POTF2(char *uplo, int *n, LM_REAL *a, int *lda, int *info);
+extern int POTRF(char *uplo, int *n, LM_REAL *a, int *lda, int *info); /* block version of dpotf2 */
+extern int POTRS(char *uplo, int *n, int *nrhs, LM_REAL *a, int *lda, LM_REAL *b, int *ldb, int *info);
+
+/* LU decomposition and systems solution */
+extern int GETRF(int *m, int *n, LM_REAL *a, int *lda, int *ipiv, int *info);
+extern int GETRS(char *trans, int *n, int *nrhs, LM_REAL *a, int *lda, int *ipiv, LM_REAL *b, int *ldb, int *info);
+
+/* Singular Value Decomposition (SVD) */
+extern int GESVD(char *jobu, char *jobvt, int *m, int *n, LM_REAL *a, int *lda, LM_REAL *s, LM_REAL *u, int *ldu,
+ LM_REAL *vt, int *ldvt, LM_REAL *work, int *lwork, int *info);
+
+/* lapack 3.0 new SVD routine, faster than xgesvd().
+ * In case that your version of LAPACK does not include them, use the above two older routines
+ */
+extern int GESDD(char *jobz, int *m, int *n, LM_REAL *a, int *lda, LM_REAL *s, LM_REAL *u, int *ldu, LM_REAL *vt, int *ldvt,
+ LM_REAL *work, int *lwork, int *iwork, int *info);
+
+/* LDLt/UDUt factorization and systems solution */
+extern int SYTRF(char *uplo, int *n, LM_REAL *a, int *lda, int *ipiv, LM_REAL *work, int *lwork, int *info);
+extern int SYTRS(char *uplo, int *n, int *nrhs, LM_REAL *a, int *lda, int *ipiv, LM_REAL *b, int *ldb, int *info);
+#ifdef __cplusplus
+}
+#endif
+
+/* precision-specific definitions */
+#define AX_EQ_B_QR LM_ADD_PREFIX(Ax_eq_b_QR)
+#define AX_EQ_B_QRLS LM_ADD_PREFIX(Ax_eq_b_QRLS)
+#define AX_EQ_B_CHOL LM_ADD_PREFIX(Ax_eq_b_Chol)
+#define AX_EQ_B_LU LM_ADD_PREFIX(Ax_eq_b_LU)
+#define AX_EQ_B_SVD LM_ADD_PREFIX(Ax_eq_b_SVD)
+#define AX_EQ_B_BK LM_ADD_PREFIX(Ax_eq_b_BK)
+#define AX_EQ_B_PLASMA_CHOL LM_ADD_PREFIX(Ax_eq_b_PLASMA_Chol)
+
+/*
+ * This function returns the solution of Ax = b
+ *
+ * The function is based on QR decomposition with explicit computation of Q:
+ * If A=Q R with Q orthogonal and R upper triangular, the linear system becomes
+ * Q R x = b or R x = Q^T b.
+ * The last equation can be solved directly.
+ *
+ * A is mxm, b is mx1
+ *
+ * The function returns 0 in case of error, 1 if successful
+ *
+ * This function is often called repetitively to solve problems of identical
+ * dimensions. To avoid repetitive malloc's and free's, allocated memory is
+ * retained between calls and free'd-malloc'ed when not of the appropriate size.
+ * A call with NULL as the first argument forces this memory to be released.
+ */
+int AX_EQ_B_QR(LM_REAL *A, LM_REAL *B, LM_REAL *x, int m)
+{
+__STATIC__ LM_REAL *buf=NULL;
+__STATIC__ int buf_sz=0;
+
+static int nb=0; /* no __STATIC__ decl. here! */
+
+LM_REAL *a, *tau, *r, *work;
+int a_sz, tau_sz, r_sz, tot_sz;
+register int i, j;
+int info, worksz, nrhs=1;
+register LM_REAL sum;
+
+ if(!A)
+#ifdef LINSOLVERS_RETAIN_MEMORY
+ {
+ if(buf) free(buf);
+ buf=NULL;
+ buf_sz=0;
+
+ return 1;
+ }
+#else
+ return 1; /* NOP */
+#endif /* LINSOLVERS_RETAIN_MEMORY */
+
+ /* calculate required memory size */
+ a_sz=m*m;
+ tau_sz=m;
+ r_sz=m*m; /* only the upper triangular part really needed */
+ if(!nb){
+ LM_REAL tmp;
+
+ worksz=-1; // workspace query; optimal size is returned in tmp
+ GEQRF((int *)&m, (int *)&m, NULL, (int *)&m, NULL, (LM_REAL *)&tmp, (int *)&worksz, (int *)&info);
+ nb=((int)tmp)/m; // optimal worksize is m*nb
+ }
+ worksz=nb*m;
+ tot_sz=a_sz + tau_sz + r_sz + worksz;
+
+#ifdef LINSOLVERS_RETAIN_MEMORY
+ if(tot_sz>buf_sz){ /* insufficient memory, allocate a "big" memory chunk at once */
+ if(buf) free(buf); /* free previously allocated memory */
+
+ buf_sz=tot_sz;
+ buf=(LM_REAL *)malloc(buf_sz*sizeof(LM_REAL));
+ if(!buf){
+ fprintf(stderr, RCAT("memory allocation in ", AX_EQ_B_QR) "() failed!\n");
+ exit(1);
+ }
+ }
+#else
+ buf_sz=tot_sz;
+ buf=(LM_REAL *)malloc(buf_sz*sizeof(LM_REAL));
+ if(!buf){
+ fprintf(stderr, RCAT("memory allocation in ", AX_EQ_B_QR) "() failed!\n");
+ exit(1);
+ }
+#endif /* LINSOLVERS_RETAIN_MEMORY */
+
+ a=buf;
+ tau=a+a_sz;
+ r=tau+tau_sz;
+ work=r+r_sz;
+
+ /* store A (column major!) into a */
+ for(i=0; i<m; i++)
+ for(j=0; j<m; j++)
+ a[i+j*m]=A[i*m+j];
+
+ /* QR decomposition of A */
+ GEQRF((int *)&m, (int *)&m, a, (int *)&m, tau, work, (int *)&worksz, (int *)&info);
+ /* error treatment */
+ if(info!=0){
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT("LAPACK error: illegal value for argument %d of ", GEQRF) " in ", AX_EQ_B_QR) "()\n", -info);
+ exit(1);
+ }
+ else{
+ fprintf(stderr, RCAT(RCAT("Unknown LAPACK error %d for ", GEQRF) " in ", AX_EQ_B_QR) "()\n", info);
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 0;
+ }
+ }
+
+ /* R is stored in the upper triangular part of a; copy it in r so that ORGQR() below won't destroy it */
+ memcpy(r, a, r_sz*sizeof(LM_REAL));
+
+ /* compute Q using the elementary reflectors computed by the above decomposition */
+ ORGQR((int *)&m, (int *)&m, (int *)&m, a, (int *)&m, tau, work, (int *)&worksz, (int *)&info);
+ if(info!=0){
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT("LAPACK error: illegal value for argument %d of ", ORGQR) " in ", AX_EQ_B_QR) "()\n", -info);
+ exit(1);
+ }
+ else{
+ fprintf(stderr, RCAT("Unknown LAPACK error (%d) in ", AX_EQ_B_QR) "()\n", info);
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 0;
+ }
+ }
+
+ /* Q is now in a; compute Q^T b in x */
+ for(i=0; i<m; i++){
+ for(j=0, sum=0.0; j<m; j++)
+ sum+=a[i*m+j]*B[j];
+ x[i]=sum;
+ }
+
+ /* solve the linear system R x = Q^t b */
+ TRTRS("U", "N", "N", (int *)&m, (int *)&nrhs, r, (int *)&m, x, (int *)&m, &info);
+ /* error treatment */
+ if(info!=0){
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT("LAPACK error: illegal value for argument %d of ", TRTRS) " in ", AX_EQ_B_QR) "()\n", -info);
+ exit(1);
+ }
+ else{
+ fprintf(stderr, RCAT("LAPACK error: the %d-th diagonal element of A is zero (singular matrix) in ", AX_EQ_B_QR) "()\n", info);
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 0;
+ }
+ }
+
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 1;
+}
+
+/*
+ * This function returns the solution of min_x ||Ax - b||
+ *
+ * || . || is the second order (i.e. L2) norm. This is a least squares technique that
+ * is based on QR decomposition:
+ * If A=Q R with Q orthogonal and R upper triangular, the normal equations become
+ * (A^T A) x = A^T b or (R^T Q^T Q R) x = A^T b or (R^T R) x = A^T b.
+ * This amounts to solving R^T y = A^T b for y and then R x = y for x
+ * Note that Q does not need to be explicitly computed
+ *
+ * A is mxn, b is mx1
+ *
+ * The function returns 0 in case of error, 1 if successful
+ *
+ * This function is often called repetitively to solve problems of identical
+ * dimensions. To avoid repetitive malloc's and free's, allocated memory is
+ * retained between calls and free'd-malloc'ed when not of the appropriate size.
+ * A call with NULL as the first argument forces this memory to be released.
+ */
+int AX_EQ_B_QRLS(LM_REAL *A, LM_REAL *B, LM_REAL *x, int m, int n)
+{
+__STATIC__ LM_REAL *buf=NULL;
+__STATIC__ int buf_sz=0;
+
+static int nb=0; /* no __STATIC__ decl. here! */
+
+LM_REAL *a, *tau, *r, *work;
+int a_sz, tau_sz, r_sz, tot_sz;
+register int i, j;
+int info, worksz, nrhs=1;
+register LM_REAL sum;
+
+ if(!A)
+#ifdef LINSOLVERS_RETAIN_MEMORY
+ {
+ if(buf) free(buf);
+ buf=NULL;
+ buf_sz=0;
+
+ return 1;
+ }
+#else
+ return 1; /* NOP */
+#endif /* LINSOLVERS_RETAIN_MEMORY */
+
+ if(m<n){
+ fprintf(stderr, RCAT("Normal equations require that the number of rows is greater than number of columns in ", AX_EQ_B_QRLS) "() [%d x %d]! -- try transposing\n", m, n);
+ exit(1);
+ }
+
+ /* calculate required memory size */
+ a_sz=m*n;
+ tau_sz=n;
+ r_sz=n*n;
+ if(!nb){
+ LM_REAL tmp;
+
+ worksz=-1; // workspace query; optimal size is returned in tmp
+ GEQRF((int *)&m, (int *)&m, NULL, (int *)&m, NULL, (LM_REAL *)&tmp, (int *)&worksz, (int *)&info);
+ nb=((int)tmp)/m; // optimal worksize is m*nb
+ }
+ worksz=nb*m;
+ tot_sz=a_sz + tau_sz + r_sz + worksz;
+
+#ifdef LINSOLVERS_RETAIN_MEMORY
+ if(tot_sz>buf_sz){ /* insufficient memory, allocate a "big" memory chunk at once */
+ if(buf) free(buf); /* free previously allocated memory */
+
+ buf_sz=tot_sz;
+ buf=(LM_REAL *)malloc(buf_sz*sizeof(LM_REAL));
+ if(!buf){
+ fprintf(stderr, RCAT("memory allocation in ", AX_EQ_B_QRLS) "() failed!\n");
+ exit(1);
+ }
+ }
+#else
+ buf_sz=tot_sz;
+ buf=(LM_REAL *)malloc(buf_sz*sizeof(LM_REAL));
+ if(!buf){
+ fprintf(stderr, RCAT("memory allocation in ", AX_EQ_B_QRLS) "() failed!\n");
+ exit(1);
+ }
+#endif /* LINSOLVERS_RETAIN_MEMORY */
+
+ a=buf;
+ tau=a+a_sz;
+ r=tau+tau_sz;
+ work=r+r_sz;
+
+ /* store A (column major!) into a */
+ for(i=0; i<m; i++)
+ for(j=0; j<n; j++)
+ a[i+j*m]=A[i*n+j];
+
+ /* compute A^T b in x */
+ for(i=0; i<n; i++){
+ for(j=0, sum=0.0; j<m; j++)
+ sum+=A[j*n+i]*B[j];
+ x[i]=sum;
+ }
+
+ /* QR decomposition of A */
+ GEQRF((int *)&m, (int *)&n, a, (int *)&m, tau, work, (int *)&worksz, (int *)&info);
+ /* error treatment */
+ if(info!=0){
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT("LAPACK error: illegal value for argument %d of ", GEQRF) " in ", AX_EQ_B_QRLS) "()\n", -info);
+ exit(1);
+ }
+ else{
+ fprintf(stderr, RCAT(RCAT("Unknown LAPACK error %d for ", GEQRF) " in ", AX_EQ_B_QRLS) "()\n", info);
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 0;
+ }
+ }
+
+ /* R is stored in the upper triangular part of a. Note that a is mxn while r nxn */
+ for(j=0; j<n; j++){
+ for(i=0; i<=j; i++)
+ r[i+j*n]=a[i+j*m];
+
+ /* lower part is zero */
+ for(i=j+1; i<n; i++)
+ r[i+j*n]=0.0;
+ }
+
+ /* solve the linear system R^T y = A^t b */
+ TRTRS("U", "T", "N", (int *)&n, (int *)&nrhs, r, (int *)&n, x, (int *)&n, &info);
+ /* error treatment */
+ if(info!=0){
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT("LAPACK error: illegal value for argument %d of ", TRTRS) " in ", AX_EQ_B_QRLS) "()\n", -info);
+ exit(1);
+ }
+ else{
+ fprintf(stderr, RCAT("LAPACK error: the %d-th diagonal element of A is zero (singular matrix) in ", AX_EQ_B_QRLS) "()\n", info);
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 0;
+ }
+ }
+
+ /* solve the linear system R x = y */
+ TRTRS("U", "N", "N", (int *)&n, (int *)&nrhs, r, (int *)&n, x, (int *)&n, &info);
+ /* error treatment */
+ if(info!=0){
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT("LAPACK error: illegal value for argument %d of ", TRTRS) " in ", AX_EQ_B_QRLS) "()\n", -info);
+ exit(1);
+ }
+ else{
+ fprintf(stderr, RCAT("LAPACK error: the %d-th diagonal element of A is zero (singular matrix) in ", AX_EQ_B_QRLS) "()\n", info);
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 0;
+ }
+ }
+
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 1;
+}
+
+/*
+ * This function returns the solution of Ax=b
+ *
+ * The function assumes that A is symmetric & postive definite and employs
+ * the Cholesky decomposition:
+ * If A=L L^T with L lower triangular, the system to be solved becomes
+ * (L L^T) x = b
+ * This amounts to solving L y = b for y and then L^T x = y for x
+ *
+ * A is mxm, b is mx1
+ *
+ * The function returns 0 in case of error, 1 if successful
+ *
+ * This function is often called repetitively to solve problems of identical
+ * dimensions. To avoid repetitive malloc's and free's, allocated memory is
+ * retained between calls and free'd-malloc'ed when not of the appropriate size.
+ * A call with NULL as the first argument forces this memory to be released.
+ */
+int AX_EQ_B_CHOL(LM_REAL *A, LM_REAL *B, LM_REAL *x, int m)
+{
+__STATIC__ LM_REAL *buf=NULL;
+__STATIC__ int buf_sz=0;
+
+LM_REAL *a;
+int a_sz, tot_sz;
+int info, nrhs=1;
+
+ if(!A)
+#ifdef LINSOLVERS_RETAIN_MEMORY
+ {
+ if(buf) free(buf);
+ buf=NULL;
+ buf_sz=0;
+
+ return 1;
+ }
+#else
+ return 1; /* NOP */
+#endif /* LINSOLVERS_RETAIN_MEMORY */
+
+ /* calculate required memory size */
+ a_sz=m*m;
+ tot_sz=a_sz;
+
+#ifdef LINSOLVERS_RETAIN_MEMORY
+ if(tot_sz>buf_sz){ /* insufficient memory, allocate a "big" memory chunk at once */
+ if(buf) free(buf); /* free previously allocated memory */
+
+ buf_sz=tot_sz;
+ buf=(LM_REAL *)malloc(buf_sz*sizeof(LM_REAL));
+ if(!buf){
+ fprintf(stderr, RCAT("memory allocation in ", AX_EQ_B_CHOL) "() failed!\n");
+ exit(1);
+ }
+ }
+#else
+ buf_sz=tot_sz;
+ buf=(LM_REAL *)malloc(buf_sz*sizeof(LM_REAL));
+ if(!buf){
+ fprintf(stderr, RCAT("memory allocation in ", AX_EQ_B_CHOL) "() failed!\n");
+ exit(1);
+ }
+#endif /* LINSOLVERS_RETAIN_MEMORY */
+
+ a=buf;
+
+ /* store A into a and B into x. A is assumed symmetric,
+ * hence no transposition is needed
+ */
+ memcpy(a, A, a_sz*sizeof(LM_REAL));
+ memcpy(x, B, m*sizeof(LM_REAL));
+
+ /* Cholesky decomposition of A */
+ //POTF2("L", (int *)&m, a, (int *)&m, (int *)&info);
+ POTRF("L", (int *)&m, a, (int *)&m, (int *)&info);
+ /* error treatment */
+ if(info!=0){
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT(RCAT("LAPACK error: illegal value for argument %d of ", POTF2) "/", POTRF) " in ",
+ AX_EQ_B_CHOL) "()\n", -info);
+ exit(1);
+ }
+ else{
+ fprintf(stderr, RCAT(RCAT(RCAT("LAPACK error: the leading minor of order %d is not positive definite,\nthe factorization could not be completed for ", POTF2) "/", POTRF) " in ", AX_EQ_B_CHOL) "()\n", info);
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 0;
+ }
+ }
+
+ /* solve using the computed Cholesky in one lapack call */
+ POTRS("L", (int *)&m, (int *)&nrhs, a, (int *)&m, x, (int *)&m, &info);
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT("LAPACK error: illegal value for argument %d of ", POTRS) " in ", AX_EQ_B_CHOL) "()\n", -info);
+ exit(1);
+ }
+
+#if 0
+ /* alternative: solve the linear system L y = b ... */
+ TRTRS("L", "N", "N", (int *)&m, (int *)&nrhs, a, (int *)&m, x, (int *)&m, &info);
+ /* error treatment */
+ if(info!=0){
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT("LAPACK error: illegal value for argument %d of ", TRTRS) " in ", AX_EQ_B_CHOL) "()\n", -info);
+ exit(1);
+ }
+ else{
+ fprintf(stderr, RCAT("LAPACK error: the %d-th diagonal element of A is zero (singular matrix) in ", AX_EQ_B_CHOL) "()\n", info);
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 0;
+ }
+ }
+
+ /* ... solve the linear system L^T x = y */
+ TRTRS("L", "T", "N", (int *)&m, (int *)&nrhs, a, (int *)&m, x, (int *)&m, &info);
+ /* error treatment */
+ if(info!=0){
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT("LAPACK error: illegal value for argument %d of ", TRTRS) "in ", AX_EQ_B_CHOL) "()\n", -info);
+ exit(1);
+ }
+ else{
+ fprintf(stderr, RCAT("LAPACK error: the %d-th diagonal element of A is zero (singular matrix) in ", AX_EQ_B_CHOL) "()\n", info);
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 0;
+ }
+ }
+#endif /* 0 */
+
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 1;
+}
+
+#ifdef HAVE_PLASMA
+
+/* Linear algebra using PLASMA parallel library for multicore CPUs.
+ * http://icl.cs.utk.edu/plasma/
+ *
+ * WARNING: BLAS multithreading should be disabled, e.g. setenv MKL_NUM_THREADS 1
+ */
+
+#ifndef _LM_PLASMA_MISC_
+/* avoid multiple inclusion of helper code */
+#define _LM_PLASMA_MISC_
+
+#include <plasma.h>
+#include <cblas.h>
+#include <lapacke.h>
+#include <plasma_tmg.h>
+#include <core_blas.h>
+
+/* programmatically determine the number of cores on the current machine */
+#ifdef _WIN32
+#include <windows.h>
+#elif __linux
+#include <unistd.h>
+#endif
+static int getnbcores()
+{
+#ifdef _WIN32
+ SYSTEM_INFO sysinfo;
+ GetSystemInfo(&sysinfo);
+ return sysinfo.dwNumberOfProcessors;
+#elif __linux
+ return sysconf(_SC_NPROCESSORS_ONLN);
+#else // unknown system
+ return 2<<1; // will be halved by right shift below
+#endif
+}
+
+static int PLASMA_ncores=-(getnbcores()>>1); // >0 if PLASMA initialized, <0 otherwise
+
+/* user-specified number of cores */
+void levmar_PLASMA_setnbcores(int cores)
+{
+ PLASMA_ncores=(cores>0)? -cores : ((cores)? cores : -2);
+}
+#endif /* _LM_PLASMA_MISC_ */
+
+/*
+ * This function returns the solution of Ax=b
+ *
+ * The function assumes that A is symmetric & positive definite and employs the
+ * Cholesky decomposition implemented by PLASMA for homogeneous multicore processors.
+ *
+ * A is mxm, b is mx1
+ *
+ * The function returns 0 in case of error, 1 if successfull
+ *
+ * This function is often called repetitively to solve problems of identical
+ * dimensions. To avoid repetitive malloc's and free's, allocated memory is
+ * retained between calls and free'd-malloc'ed when not of the appropriate size.
+ * A call with NULL as the first argument forces this memory to be released.
+ */
+int AX_EQ_B_PLASMA_CHOL(LM_REAL *A, LM_REAL *B, LM_REAL *x, int m)
+{
+__STATIC__ LM_REAL *buf=NULL;
+__STATIC__ int buf_sz=0;
+
+LM_REAL *a;
+int a_sz, tot_sz;
+int info, nrhs=1;
+
+ if(A==NULL){
+#ifdef LINSOLVERS_RETAIN_MEMORY
+ if(buf) free(buf);
+ buf=NULL;
+ buf_sz=0;
+#endif /* LINSOLVERS_RETAIN_MEMORY */
+
+ PLASMA_Finalize();
+ PLASMA_ncores=-PLASMA_ncores;
+
+ return 1;
+ }
+
+ /* calculate required memory size */
+ a_sz=m*m;
+ tot_sz=a_sz;
+
+#ifdef LINSOLVERS_RETAIN_MEMORY
+ if(tot_sz>buf_sz){ /* insufficient memory, allocate a "big" memory chunk at once */
+ if(buf) free(buf); /* free previously allocated memory */
+
+ buf_sz=tot_sz;
+ buf=(LM_REAL *)malloc(buf_sz*sizeof(LM_REAL));
+ if(!buf){
+ fprintf(stderr, RCAT("memory allocation in ", AX_EQ_B_PLASMA_CHOL) "() failed!\n");
+ exit(1);
+ }
+ }
+#else
+ buf_sz=tot_sz;
+ buf=(LM_REAL *)malloc(buf_sz*sizeof(LM_REAL));
+ if(!buf){
+ fprintf(stderr, RCAT("memory allocation in ", AX_EQ_B_PLASMA_CHOL) "() failed!\n");
+ exit(1);
+ }
+#endif /* LINSOLVERS_RETAIN_MEMORY */
+
+ a=buf;
+
+ /* store A into a and B into x; A is assumed to be symmetric,
+ * hence no transposition is needed
+ */
+ memcpy(a, A, a_sz*sizeof(LM_REAL));
+ memcpy(x, B, m*sizeof(LM_REAL));
+
+ /* initialize PLASMA */
+ if(PLASMA_ncores<0){
+ PLASMA_ncores=-PLASMA_ncores;
+ PLASMA_Init(PLASMA_ncores);
+ fprintf(stderr, RCAT("\n", AX_EQ_B_PLASMA_CHOL) "(): PLASMA is running on %d cores.\n\n", PLASMA_ncores);
+ }
+
+ /* Solve the linear system */
+ info=PLASMA_POSV(PlasmaLower, m, 1, a, m, x, m);
+ /* error treatment */
+ if(info!=0){
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT("LAPACK error: illegal value for argument %d of ", PLASMA_POSV) " in ",
+ AX_EQ_B_PLASMA_CHOL) "()\n", -info);
+ exit(1);
+ }
+ else{
+ fprintf(stderr, RCAT(RCAT("LAPACK error: the leading minor of order %d is not positive definite,\n"
+ "the factorization could not be completed for ", PLASMA_POSV) " in ", AX_EQ_B_CHOL) "()\n", info);
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+ return 0;
+ }
+ }
+
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 1;
+}
+#endif /* HAVE_PLASMA */
+
+/*
+ * This function returns the solution of Ax = b
+ *
+ * The function employs LU decomposition:
+ * If A=L U with L lower and U upper triangular, then the original system
+ * amounts to solving
+ * L y = b, U x = y
+ *
+ * A is mxm, b is mx1
+ *
+ * The function returns 0 in case of error, 1 if successful
+ *
+ * This function is often called repetitively to solve problems of identical
+ * dimensions. To avoid repetitive malloc's and free's, allocated memory is
+ * retained between calls and free'd-malloc'ed when not of the appropriate size.
+ * A call with NULL as the first argument forces this memory to be released.
+ */
+int AX_EQ_B_LU(LM_REAL *A, LM_REAL *B, LM_REAL *x, int m)
+{
+__STATIC__ LM_REAL *buf=NULL;
+__STATIC__ int buf_sz=0;
+
+int a_sz, ipiv_sz, tot_sz;
+register int i, j;
+int info, *ipiv, nrhs=1;
+LM_REAL *a;
+
+ if(!A)
+#ifdef LINSOLVERS_RETAIN_MEMORY
+ {
+ if(buf) free(buf);
+ buf=NULL;
+ buf_sz=0;
+
+ return 1;
+ }
+#else
+ return 1; /* NOP */
+#endif /* LINSOLVERS_RETAIN_MEMORY */
+
+ /* calculate required memory size */
+ ipiv_sz=m;
+ a_sz=m*m;
+ tot_sz=a_sz*sizeof(LM_REAL) + ipiv_sz*sizeof(int); /* should be arranged in that order for proper doubles alignment */
+
+#ifdef LINSOLVERS_RETAIN_MEMORY
+ if(tot_sz>buf_sz){ /* insufficient memory, allocate a "big" memory chunk at once */
+ if(buf) free(buf); /* free previously allocated memory */
+
+ buf_sz=tot_sz;
+ buf=(LM_REAL *)malloc(buf_sz);
+ if(!buf){
+ fprintf(stderr, RCAT("memory allocation in ", AX_EQ_B_LU) "() failed!\n");
+ exit(1);
+ }
+ }
+#else
+ buf_sz=tot_sz;
+ buf=(LM_REAL *)malloc(buf_sz);
+ if(!buf){
+ fprintf(stderr, RCAT("memory allocation in ", AX_EQ_B_LU) "() failed!\n");
+ exit(1);
+ }
+#endif /* LINSOLVERS_RETAIN_MEMORY */
+
+ a=buf;
+ ipiv=(int *)(a+a_sz);
+
+ /* store A (column major!) into a and B into x */
+ for(i=0; i<m; i++){
+ for(j=0; j<m; j++)
+ a[i+j*m]=A[i*m+j];
+
+ x[i]=B[i];
+ }
+
+ /* LU decomposition for A */
+ GETRF((int *)&m, (int *)&m, a, (int *)&m, ipiv, (int *)&info);
+ if(info!=0){
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT("argument %d of ", GETRF) " illegal in ", AX_EQ_B_LU) "()\n", -info);
+ exit(1);
+ }
+ else{
+ fprintf(stderr, RCAT(RCAT("singular matrix A for ", GETRF) " in ", AX_EQ_B_LU) "()\n");
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 0;
+ }
+ }
+
+ /* solve the system with the computed LU */
+ GETRS("N", (int *)&m, (int *)&nrhs, a, (int *)&m, ipiv, x, (int *)&m, (int *)&info);
+ if(info!=0){
+ if(info<0){
+ fprintf(stderr, RCAT(RCAT("argument %d of ", GETRS) " illegal in ", AX_EQ_B_LU) "()\n", -info);
+ exit(1);
+ }
+ else{
+ fprintf(stderr, RCAT(RCAT("unknown error for ", GETRS) " in ", AX_EQ_B_LU) "()\n");
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 0;
+ }
+ }
+
+#ifndef LINSOLVERS_RETAIN_MEMORY
+ free(buf);
+#endif
+
+ return 1;
+}
+
+/*
+ * This function returns the solution of Ax = b
+ *
+ * The function is based on SVD decomposition:
+ * If A=U D V^T with U, V orthogonal and D diagonal, the linear system becomes
+ * (U D V^T) x = b or x=V D^{-1} U^T b
+ * Note that V D^{-1} U^T is the pseudoinverse A^+
+ *
+ * A is mxm, b is mx1.
+ *
+ * The function returns 0 in case of error, 1 if successful