aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-06-19 12:33:51 +0200
committerThomas White <taw@physics.org>2015-06-19 12:38:12 +0200
commit1062513f7ecb912a50aef9559270a8218c0bacde (patch)
treebefe54e76e0ce2f686b223d5d3f78afeb8ea8f5f
parent89368cc3992e721c65d3783a76f854cab2643b9b (diff)
Compile asdf only if FFTW is available
-rw-r--r--configure.ac1
-rw-r--r--libcrystfel/Makefile.am3
-rw-r--r--libcrystfel/src/asdf.c30
-rw-r--r--libcrystfel/src/asdf.h60
4 files changed, 89 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index d475d6e0..5086459c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -282,6 +282,7 @@ PKG_CHECK_MODULES([FFTW], [fftw3],
have_fftw=true
AC_DEFINE([HAVE_FFTW], [1], [Define to 1 if FFTW is available])
], [
+ AC_MSG_WARN([asdf indexing wil not be available.])
have_fftw=false
])
diff --git a/libcrystfel/Makefile.am b/libcrystfel/Makefile.am
index be7a2556..8e5acaaf 100644
--- a/libcrystfel/Makefile.am
+++ b/libcrystfel/Makefile.am
@@ -10,9 +10,10 @@ libcrystfel_la_SOURCES = src/reflist.c src/utils.c src/cell.c src/detector.c \
src/render.c src/index.c src/dirax.c src/mosflm.c \
src/cell-utils.c src/integer_matrix.c src/crystal.c \
src/xds.c src/integration.c \
- src/histogram.c src/events.c src/asdf.c
+ src/histogram.c src/events.c
if HAVE_FFTW
+libcrystfel_la_SOURCES += src/asdf.c
endif
libcrystfel_la_includedir=$(includedir)/crystfel/
diff --git a/libcrystfel/src/asdf.c b/libcrystfel/src/asdf.c
index 345bd32c..b5436f7f 100644
--- a/libcrystfel/src/asdf.c
+++ b/libcrystfel/src/asdf.c
@@ -1,3 +1,33 @@
+/*
+ * asdf.c
+ *
+ * Alexandra's Superior Direction Finder, or
+ * Algorithm Similar to DirAx, FFT-based
+ *
+ * Copyright © 2014-2015 Deutsches Elektronen-Synchrotron DESY,
+ * a research centre of the Helmholtz Association.
+ *
+ * Authors:
+ * 2014-2015 Alexandra Tolstikova <alexandra.tolstikova@desy.de>
+ * 2015 Thomas White <taw@physics.org>
+ *
+ * This file is part of CrystFEL.
+ *
+ * CrystFEL 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CrystFEL 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CrystFEL. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
diff --git a/libcrystfel/src/asdf.h b/libcrystfel/src/asdf.h
index 402636d1..2c070d79 100644
--- a/libcrystfel/src/asdf.h
+++ b/libcrystfel/src/asdf.h
@@ -1,4 +1,32 @@
-
+/*
+ * asdf.h
+ *
+ * Alexandra's Superior Direction Finder, or
+ * Algorithm Similar to DirAx, FFT-based
+ *
+ * Copyright © 2014-2015 Deutsches Elektronen-Synchrotron DESY,
+ * a research centre of the Helmholtz Association.
+ *
+ * Authors:
+ * 2014-2015 Alexandra Tolstikova <alexandra.tolstikova@desy.de>
+ * 2015 Thomas White <taw@physics.org>
+ *
+ * This file is part of CrystFEL.
+ *
+ * CrystFEL 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CrystFEL 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CrystFEL. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
#ifndef ASDF_H
#define ASDF_H
@@ -13,16 +41,40 @@
extern "C" {
#endif
+#ifdef HAVE_FFTW
+
extern int run_asdf(struct image *image, IndexingPrivate *ipriv);
extern IndexingPrivate *asdf_prepare(IndexingMethod *indm,
- UnitCell *cell, struct detector *det,
- float *ltl);
+ UnitCell *cell, struct detector *det,
+ float *ltl);
extern void asdf_cleanup(IndexingPrivate *pp);
+#else /* HAVE_FFTW */
+
+int run_asdf(struct image *image, IndexingPrivate *ipriv)
+{
+}
+
+
+IndexingPrivate *asdf_prepare(IndexingMethod *indm,
+ UnitCell *cell, struct detector *det,
+ float *ltl)
+{
+ return NULL;
+}
+
+void asdf_cleanup(IndexingPrivate *pp)
+{
+}
+
+
+#endif /* HAVE_FFTW */
+
+
#ifdef __cplusplus
}
#endif
-#endif /* DIRAX_H */
+#endif /* ASDF_H */