Permalink
Browse files

added m4 files, moved to levmar

  • Loading branch information...
2 parents b66b6ba + 1aa5f92 commit fd4a87b6cffcd7ed7502ba84952ac337d6de1c56 @laurentbartholdi committed Oct 17, 2012
Showing with 656 additions and 1,033 deletions.
  1. +1 −1 .gitignore
  2. +3 −5 README
  3. +2 −20 cnf/Makefile.in
  4. +2 −0 cnf/aclocal.m4
  5. +5 −70 cnf/configure.ac
  6. +45 −0 cnf/m4/ac_check_levmar.m4
  7. +21 −0 cnf/m4/ac_sys_is.m4
  8. +69 −107 configure
  9. +1 −1 doc/fr.xml
  10. +4 −12 gap/triangulations.g
  11. +1 −1 hurwitz/Makefile.in
  12. +55 −3 hurwitz/aclocal.m4
  13. +421 −325 hurwitz/configure
  14. +3 −46 hurwitz/configure.ac
  15. +0 −331 src/findrat.c
  16. +23 −111 src/fr_dll.c
View
@@ -9,6 +9,7 @@ frbib.xml.bib
autom4te.cache
.DS_Store
doc/chap*
+doc/manual.*
doc/*.aux
doc/*.pnr
doc/*.tex
@@ -21,6 +22,5 @@ doc/*.ilg
doc/*.ind
doc/*.out
doc/*.toc
-doc/manual.*
myconfigure
.version
View
8 README
@@ -40,17 +40,15 @@ An optional external module (DLL) provides floating-point functions used
by the "iterated monodromy groups" part of FR. Its presence or absence
does not affect the remainder of FR. To compile it, first make sure that
your system has C and JAVA compilers. You will need some external libraries,
-in particular gsl, levmar, and libdogleg. To install them:
+in particular levmar and libdogleg. To install them:
* on Linux, use a package-manager such as 'apt-get', 'rpm' if possible. On
- debian/ubuntu systems, you will need libgsl0-dev and libsuitesparse-dev.
+ debian/ubuntu systems, you will need libsuitesparse-dev.
* on UNIX systems, install the libraries:
- The gsl library may be found at http://ftpmirror.gnu.org/gsl/gsl-1.15.tar.gz
The dogleg library may be found at https://github.com/Oblong/libdogleg.git
The levmar library may be found at http://www.ics.forth.gr/~lourakis/levmar/levmar-2.6.tar.gz
* on Mac OSX, use 'homebrew' (http://mxcl.github.com/homebrew/), and install the formulas by invoking
- % brew install libgsl
% brew install https://raw.github.com/laurentbartholdi/homebrew/levenberg-marquardt-lib/Library/Formula/levmar.rb
% brew install https://raw.github.com/laurentbartholdi/homebrew/libdogleg/Library/Formula/libdogleg.rb
@@ -75,4 +73,4 @@ You should have received a copy of the GNU General Public License
along with this program, in the file COPYING. If not, see
<http://www.gnu.org/licenses/>.
- Laurent Bartholdi, Göttingen, 2 September 2012
+ Laurent Bartholdi, Göttingen, 17 October 2012
View
@@ -21,32 +21,14 @@ EXTERN=$(CURDIR)/bin/@GAPARCH@/extern
MYCC=./libtool --mode=compile @CC@ $(CFLAGS) @CFLAGS@ @GAP_CPPFLAGS@ -std=c99 -g -Wall
MYLD=./libtool --mode=link @CC@ $(CFLAGS) -g
JAVAC=@JAVAC@
-GSLLIB=gsl-1.15
all: $(LOCALBIN) @LIB_TARGET@ $(LOCALBIN)/fr_dll.so @JAVABUILD@ hurwitz
lib:
- echo Make sure you downloaded extern/$(GSLLIB).tar.gz (instructions in extern/GET_LIBARIES)
- $(MAKE) gsllib
hurwitz:
$(MAKE) -C $@
-extern/$(GSLLIB).tar.gz:
- echo "I can't find $(GSLLIB), so I'm going to download it"
- (cd extern; wget --no-verbose http://ftpmirror.gnu.org/gsl/$(GSLLIB).tar.gz)
-
-gsllib: extern/$(GSLLIB).tar.gz
- if ! test -r $(EXTERN)/include/gsl/gsl_vector.h; then \
- cd extern && \
- rm -rf $(GSLLIB) && \
- tar -x -f $(GSLLIB).tar.gz -z && \
- cd $(GSLLIB) && \
- ./configure --prefix=$(EXTERN) && \
- $(MAKE) && \
- $(MAKE) install; \
- fi
-
distribute: wwwdir doc tarballs
$(LOCALBIN):
@@ -59,10 +41,10 @@ $(LOCALBIN)/p1.lo: src/p1.c src/cpoly.C src/fr_dll.h
$(MYCC) -c $< -o $@ -DCONFIG_H
$(LOCALBIN)/fr_dll.lo: src/fr_dll.c src/cpoly.C src/fr_dll.h
- $(MYCC) -c $< -o $@ -DCONFIG_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 $+ -lgsl -rpath $(PWD)/$(LOCALBIN)
+ $(MYLD) -module -o $(LOCALBIN)/fr_dll.la $+ @LEVMAR_LDFLAGS@ @LEVMAR_LIBS@ -rpath $(PWD)/$(LOCALBIN)
cp $(LOCALBIN)/.libs/fr_dll.so $@
java/javaplot.class: src/javaplot.java
View
@@ -61,7 +61,9 @@ AC_DEFUN([_AM_SUBST_NOTMAKE])
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+m4_include([m4/ac_check_levmar.m4])
m4_include([m4/ac_find_gap.m4])
+m4_include([m4/ac_sys_is.m4])
m4_include([m4/ax_cc_maxopt.m4])
m4_include([m4/ax_check_compiler_flags.m4])
m4_include([m4/ax_compiler_vendor.m4])
View
@@ -33,80 +33,15 @@ AC_C_INLINE
# Locates GAP
AC_FIND_GAP
-# Finds if DOS/MacOSX install
-AC_CYGWIN
-AM_CONDITIONAL([SYS_IS_CYGWIN], [test "$CYGWIN" = "yes"])
-if test "$CYGWIN" = "yes"; then
- AC_DEFINE(SYS_IS_CYGWIN32, 1, are we on CYGWIN?)
-else
- AC_DEFINE(SYS_IS_CYGWIN32, 0, are we on CYGWIN?)
-fi
-
-case "$host" in
- *-darwin* )
- AC_DEFINE(SYS_IS_DARWIN, 1, are we on DARWIN?)
- ;;
- * )
- AC_DEFINE(SYS_IS_DARWIN, 0, are we on DARWIN?)
- ;;
-esac
-
-EXTERN="\$(CURDIR)/bin/$TARGET/extern"
+AC_SYS_IS_CYGWIN
+AC_SYS_IS_DARWIN
################################################################
-# Check for gsl library
-
+# external libraries configuration
+EXTERN="\$(CURDIR)/bin/$TARGET/extern"
LIB_TARGET=""
-GSLDIR="yes"
-GSLINCLUDE=""
-GSLLIB=""
-AC_ARG_WITH(gsl,
- [ --with-gsl=<path>|yes|extern
- Location at which the GSL library was installed.
- If the argument is omitted, the library is assumed to be reachable
- under the standard search path (/usr, /usr/local,...). Otherwise
- you must give the <path> to the directory which contains the
- library. The special value "extern", which is the default, asks Float
- to compile a version of gsl in the subdirectory extern/.
- ],
- [GSLDIR="$withval"]
-)
-
-AC_ARG_WITH(gsl-include,
- [ --with-gsl-include=<location>
- Location at which the GSL include files were installed.],
- [GSLINCLUDE="$withval"]
-)
-
-AC_ARG_WITH(gsl-lib,
- [ --with-gsl-lib=<location>
- Location at which the GSL library files were installed.],
- [GSLLIB="$withval"]
-)
-
-if test "$GSLDIR" = extern; then
- LIB_TARGET="$LIB_TARGET gsllib"
-else
- if test "$GSLDIR" != yes; then
- if test "$GSLINCLUDE" == ""; then GSLINCLUDE="$GSLDIR/include"; fi
- if test "$GSLLIB" == ""; then GSLLIB="$GSLDIR/lib"; fi
- CPPFLAGS="$CPPFLAGS -I$GSLINCLUDE"
- GAP_CPPFLAGS="$GAP_CPPFLAGS -I$GSLINCLUDE"
- LIBS="$LIBS -L$GSLLIB"
- fi
- AC_CHECK_HEADER(gsl/gsl_vector.h,[],[AC_MSG_ERROR([library gsl not found. Specify its location using --with-gsl])],[])
- AC_CHECK_LIB([gsl],[gsl_multiroot_fsolver_set],,
- [AC_ERROR([The GSL library could not be found. It is needed for IMG calculations.])],[-lgslcblas])
- AC_CHECK_LIB([gslcblas],[cblas_ctrmv],,
- [AC_ERROR([The GSL CBlas library could not be found. It is needed for IMG calculations.])])
-fi
-
-if test "$GSLLIB" != ""; then
- LIBS="$GAP_LDFLAGS -L$GSLLIB -Wl,-rpath,$GSLLIB"
-fi
-
-LIBS="$LIBS -lgsl -lgslcblas"
+AC_CHECK_LEVMAR
################################################################
# external programs configuration
View
@@ -0,0 +1,45 @@
+# check for levmar library
+# sets the LEVMAR_CFLAGS, LEVMAR_LDFLAGS and LEVMAR_LIBS appropriately
+
+AC_DEFUN([AC_CHECK_LEVMAR],[
+
+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"]
+)
+
+AC_ARG_WITH(levmar-include,
+ [ --with-levmar-include=<location>
+ Location at which the levmar include files were installed.],
+ [LEVMAR_CFLAGS="-I$withval"]
+)
+
+AC_ARG_WITH(levmar-lib,
+ [ --with-levmar-lib=<location>
+ Location at which the levmar library files were installed.
+ ],
+ [LEVMAR_LDFLAGS="-L$withval"]
+)
+
+LEVMAR_LIBS="-llevmar -llapack -lblas"
+
+AC_LANG_PUSH([C])
+
+lm_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS $LEVMAR_CFLAGS"
+AC_CHECK_HEADER(levmar.h,,AC_MSG_ERROR([levmar.h not found. Specify its location using --with-levmar.
+The package may be downloaded from http://www.ics.forth.gr/~lourakis/levmar/]))
+CFLAGS=$lm_CFLAGS
+
+lm_LDFLAGS=$LDFLAGS
+LDFLAGS="$LDFLAGS $LEVMAR_LDFLAGS"
+AC_CHECK_LIB(levmar,dlevmar_dif,,AC_MSG_ERROR([liblevmar not found. Specify its location using --with-levmar.]),[-llapack -lblas])
+LDFLAGS=$lm_LDFLAGS
+
+AC_LANG_POP([C])
+
+AC_SUBST(LEVMAR_CFLAGS)
+AC_SUBST(LEVMAR_LDFLAGS)
+AC_SUBST(LEVMAR_LIBS)
+])
View
@@ -0,0 +1,21 @@
+# Finds if DOS/MacOSX install
+AC_DEFUN([AC_SYS_IS_CYGWIN],[
+AC_CYGWIN
+AM_CONDITIONAL([SYS_IS_CYGWIN], [test "$CYGWIN" = "yes"])
+if test "$CYGWIN" = "yes"; then
+ AC_DEFINE(SYS_IS_CYGWIN32, 1, are we on CYGWIN?)
+else
+ AC_DEFINE(SYS_IS_CYGWIN32, 0, are we on CYGWIN?)
+fi
+])
+
+AC_DEFUN([AC_SYS_IS_DARWIN],[
+case "$host" in
+ *-darwin* )
+ AC_DEFINE(SYS_IS_DARWIN, 1, are we on DARWIN?)
+ ;;
+ * )
+ AC_DEFINE(SYS_IS_DARWIN, 0, are we on DARWIN?)
+ ;;
+esac
+])
Oops, something went wrong.

0 comments on commit fd4a87b

Please sign in to comment.