Skip to content

Commit

Permalink
Merge branch 'configure'
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentbartholdi committed Oct 17, 2012
2 parents 1b33042 + 6bc694d commit 8fd0a98
Show file tree
Hide file tree
Showing 27 changed files with 41,766 additions and 1,779 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,4 +1,6 @@
Makefile
Makefile-*
confdefs.h
config.log
www
sandbox
Expand Down
8 changes: 3 additions & 5 deletions README
Expand Up @@ -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

Expand All @@ -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
56 changes: 19 additions & 37 deletions cnf/Makefile.in
Expand Up @@ -15,56 +15,37 @@

.PHONY: all lib doc clean distribute mrproper wwwdir checkblocks tarballs hurwitz

LOCALBIN=bin/@TARGET@
EXTERN=$(CURDIR)/bin/@TARGET@/extern
LOCALBIN=bin/@GAPARCH@
EXTERN=$(CURDIR)/bin/@GAPARCH@/extern

CFLAGS=@CFLAGS@ -fPIC -std=c99 -Wall -I@GAPDIR@ -I@GAPDIR@/$(LOCALBIN) @GMP_CFLAGS@
CC=@CC@ $(CFLAGS)
MYCC=./libtool --mode=compile @CC@ $(CFLAGS) @CFLAGS@ @GAP_CPPFLAGS@ -std=c99 -g -Wall
MYLD=./libtool --mode=link @CC@ $(CFLAGS) -g
JAVAC=@JAVAC@
GAPPROG=@GAPPROG@
GAC=@GAC@
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) CFLAGS="$(CFLAGS) @c_options@" && \
$(MAKE) && \
$(MAKE) install; \
fi

distribute: wwwdir doc tarballs

$(LOCALBIN):
mkdir -p $(LOCALBIN)

$(LOCALBIN)/rpoly.o: src/rpoly.c src/poly.h
$(CC) -c $< -o $@
$(LOCALBIN)/rpoly.lo: src/rpoly.c src/poly.h
$(MYCC) -c $< -o $@

$(LOCALBIN)/p1.o: src/p1.c src/cpoly.C src/fr_dll.h
$(CC) -c $< -o $@ -DCONFIG_H
$(LOCALBIN)/p1.lo: src/p1.c src/cpoly.C src/fr_dll.h
$(MYCC) -c $< -o $@ -DCONFIG_H

$(LOCALBIN)/fr_dll.o: src/fr_dll.c src/cpoly.C src/fr_dll.h
$(CC) -c $< -o $@ -DCONFIG_H
$(LOCALBIN)/fr_dll.lo: src/fr_dll.c src/cpoly.C src/fr_dll.h
$(MYCC) -c $< -o $@ @LEVMAR_CFLAGS@ -DCONFIG_H

$(LOCALBIN)/fr_dll.so: $(LOCALBIN)/fr_dll.o $(LOCALBIN)/rpoly.o $(LOCALBIN)/p1.o
$(GAC) -d -o $@ $+ @GACFLAGS@
$(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 $@

java/javaplot.class: src/javaplot.java
$(JAVAC) -cp java/javaview.jar $< -d java
Expand All @@ -78,12 +59,13 @@ clean:
rm -rf .version config.log $(LOCALBIN) `find doc -type l`
make -C hurwitz clean

configure: cnf/Makefile.in cnf/configure.ac
(cd cnf; autoconf; mv -f configure ..)

mrproper: clean
rm Makefile
rm hurwitz/Makefile
make -C hurwitz mrproper

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}' > $@
Expand All @@ -93,7 +75,7 @@ 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();' | $(GAPPROG) -r -q
echo 'LoadPackage("fr"); DOC@FR();' | @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:
Expand Down
80 changes: 80 additions & 0 deletions cnf/aclocal.m4
@@ -0,0 +1,80 @@
# generated automatically by aclocal 1.12.1 -*- Autoconf -*-

# Copyright (C) 1996-2012 Free Software Foundation, Inc.

# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

# AM_CONDITIONAL -*- Autoconf -*-

# Copyright (C) 1997-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# serial 10

# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ([2.52])dnl
m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
m4_define([_AM_COND_VALUE_$1], [$2])dnl
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])

# Copyright (C) 2006-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# serial 3

# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])

# AM_SUBST_NOTMAKE(VARIABLE)
# --------------------------
# 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])
m4_include([m4/ax_gcc_archflag.m4])
m4_include([m4/ax_gcc_x86_cpuid.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])

0 comments on commit 8fd0a98

Please sign in to comment.