diff options
author | Thomas White <taw@physics.org> | 2021-04-27 13:12:09 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-04-27 13:18:32 +0200 |
commit | c66781ed4d8beb611a1155be540cffb3df7ce146 (patch) | |
tree | 2e1a724e711ed1446bde872bab9761be66fbf7a2 /libcrystfel | |
parent | 7424f7d7190d221e5dedcdeadc2809ec8166292e (diff) |
Rename libcrystfel's config.h to libcrystfel-config.h
This removes the big potential for confusion, which has happened several
times (see e.g. 095cbebaf6). It also fixes in-tree builds with CMake
(but seriously, always use out-of-tree builds).
Fixes #2.
Diffstat (limited to 'libcrystfel')
39 files changed, 39 insertions, 116 deletions
diff --git a/libcrystfel/CMakeLists.txt b/libcrystfel/CMakeLists.txt index 26ac2302..1fef33a4 100644 --- a/libcrystfel/CMakeLists.txt +++ b/libcrystfel/CMakeLists.txt @@ -27,7 +27,7 @@ set(CMAKE_REQUIRED_LIBRARIES "-lz") check_symbol_exists(gzbuffer "zlib.h" HAVE_GZBUFFER) unset(CMAKE_REQUIRED_LIBRARIES) -configure_file(config.h.cmake.in config.h) +configure_file(libcrystfel-config.h.cmake.in libcrystfel-config.h) bison_target(symopp src/symop.y ${CMAKE_CURRENT_BINARY_DIR}/symop-parse.c COMPILE_FLAGS --report=all) flex_target(symopl src/symop.l ${CMAKE_CURRENT_BINARY_DIR}/symop-lex.c @@ -140,7 +140,6 @@ set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") target_include_directories(${PROJECT_NAME} INTERFACE ${PROJECT_SOURCE_DIR}/src) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -add_definitions(-DHAVE_CONFIG_H) target_include_directories(${PROJECT_NAME} PRIVATE ${HDF5_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS}) target_link_libraries(${PROJECT_NAME} PRIVATE util ${HDF5_C_LIBRARIES} ${ZLIB_LIBRARIES} diff --git a/libcrystfel/config.h.cmake.in b/libcrystfel/libcrystfel-config.h.cmake.in index 1a81ffde..1a81ffde 100644 --- a/libcrystfel/config.h.cmake.in +++ b/libcrystfel/libcrystfel-config.h.cmake.in diff --git a/libcrystfel/config.h.in b/libcrystfel/libcrystfel-config.h.meson.in index 1cadfd02..1cadfd02 100644 --- a/libcrystfel/config.h.in +++ b/libcrystfel/libcrystfel-config.h.meson.in diff --git a/libcrystfel/meson.build b/libcrystfel/meson.build index 3ee9d495..8ed03454 100644 --- a/libcrystfel/meson.build +++ b/libcrystfel/meson.build @@ -121,8 +121,8 @@ libcrystfel_sources = ['src/image.c', symop_parse_ch, ] -configure_file(input : 'config.h.in', - output : 'config.h', +configure_file(input : 'libcrystfel-config.h.meson.in', + output : 'libcrystfel-config.h', configuration : conf_data) libcrystfel_conf_inc = include_directories('.') diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c index bb654bc5..b2708fb2 100644 --- a/libcrystfel/src/cell-utils.c +++ b/libcrystfel/src/cell-utils.c @@ -28,9 +28,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <math.h> #include <stdlib.h> diff --git a/libcrystfel/src/cell.c b/libcrystfel/src/cell.c index 2e944ddb..4dea2ce1 100644 --- a/libcrystfel/src/cell.c +++ b/libcrystfel/src/cell.c @@ -30,9 +30,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <math.h> #include <assert.h> diff --git a/libcrystfel/src/colscale.c b/libcrystfel/src/colscale.c index 4a39de8d..80e9e51b 100644 --- a/libcrystfel/src/colscale.c +++ b/libcrystfel/src/colscale.c @@ -26,10 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - +#include <libcrystfel-config.h> #include <stdlib.h> #include <math.h> diff --git a/libcrystfel/src/crystal.c b/libcrystfel/src/crystal.c index c9f59bb7..71d707d6 100644 --- a/libcrystfel/src/crystal.c +++ b/libcrystfel/src/crystal.c @@ -27,9 +27,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include "crystal.h" #include "utils.h" diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c index e47a83b3..f746b7f5 100644 --- a/libcrystfel/src/datatemplate.c +++ b/libcrystfel/src/datatemplate.c @@ -26,9 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <math.h> diff --git a/libcrystfel/src/detgeom.c b/libcrystfel/src/detgeom.c index fe247ba6..122dcd87 100644 --- a/libcrystfel/src/detgeom.c +++ b/libcrystfel/src/detgeom.c @@ -26,10 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - +#include <libcrystfel-config.h> #include <math.h> #include <stdlib.h> diff --git a/libcrystfel/src/fom.c b/libcrystfel/src/fom.c index af1ba8fe..33887bd8 100644 --- a/libcrystfel/src/fom.c +++ b/libcrystfel/src/fom.c @@ -27,9 +27,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_statistics.h> diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c index 68a532b8..e847711d 100644 --- a/libcrystfel/src/geometry.c +++ b/libcrystfel/src/geometry.c @@ -26,10 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - +#include <libcrystfel-config.h> #include <stdlib.h> #include <assert.h> diff --git a/libcrystfel/src/image-cbf.c b/libcrystfel/src/image-cbf.c index c9de17df..2ea5f0a5 100644 --- a/libcrystfel/src/image-cbf.c +++ b/libcrystfel/src/image-cbf.c @@ -26,9 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <assert.h> diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c index 7af0e3a6..c939e136 100644 --- a/libcrystfel/src/image-hdf5.c +++ b/libcrystfel/src/image-hdf5.c @@ -27,9 +27,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <assert.h> diff --git a/libcrystfel/src/image-msgpack.c b/libcrystfel/src/image-msgpack.c index 2f7b4575..920634fe 100644 --- a/libcrystfel/src/image-msgpack.c +++ b/libcrystfel/src/image-msgpack.c @@ -28,9 +28,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <stdio.h> diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index b40819ef..1e2b7a3c 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -27,9 +27,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <assert.h> diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index 37ced03d..c6876468 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -32,9 +32,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <stdio.h> diff --git a/libcrystfel/src/indexers/asdf.c b/libcrystfel/src/indexers/asdf.c index 0c57f9f0..a8943688 100644 --- a/libcrystfel/src/indexers/asdf.c +++ b/libcrystfel/src/indexers/asdf.c @@ -28,9 +28,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <stdio.h> diff --git a/libcrystfel/src/indexers/dirax.c b/libcrystfel/src/indexers/dirax.c index 4b59f6cb..ef90a3f7 100644 --- a/libcrystfel/src/indexers/dirax.c +++ b/libcrystfel/src/indexers/dirax.c @@ -26,10 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - +#include <libcrystfel-config.h> #include <stdlib.h> #include <stdio.h> diff --git a/libcrystfel/src/indexers/felix.c b/libcrystfel/src/indexers/felix.c index a02f146f..dcd50613 100644 --- a/libcrystfel/src/indexers/felix.c +++ b/libcrystfel/src/indexers/felix.c @@ -27,10 +27,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - +#include <libcrystfel-config.h> /** \file felix.h */ diff --git a/libcrystfel/src/indexers/fromfile.c b/libcrystfel/src/indexers/fromfile.c index 1f3cc0da..9a99b242 100644 --- a/libcrystfel/src/indexers/fromfile.c +++ b/libcrystfel/src/indexers/fromfile.c @@ -29,6 +29,8 @@ * */ +#include <libcrystfel-config.h> + #include <stdlib.h> #include <stdio.h> #include <math.h> diff --git a/libcrystfel/src/indexers/mosflm.c b/libcrystfel/src/indexers/mosflm.c index b0e0b121..5d107234 100644 --- a/libcrystfel/src/indexers/mosflm.c +++ b/libcrystfel/src/indexers/mosflm.c @@ -54,10 +54,7 @@ * worth another look at the documentation. */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - +#include <libcrystfel-config.h> #include <stdlib.h> #include <stdio.h> diff --git a/libcrystfel/src/indexers/pinkindexer.c b/libcrystfel/src/indexers/pinkindexer.c index 5cb979a9..7da44f73 100644 --- a/libcrystfel/src/indexers/pinkindexer.c +++ b/libcrystfel/src/indexers/pinkindexer.c @@ -27,9 +27,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include "pinkindexer.h" diff --git a/libcrystfel/src/indexers/taketwo.c b/libcrystfel/src/indexers/taketwo.c index 1bccf1e0..4b481e93 100644 --- a/libcrystfel/src/indexers/taketwo.c +++ b/libcrystfel/src/indexers/taketwo.c @@ -86,9 +86,7 @@ * * Clean up the mess (cleanup_taketwo_obs_vecs()) */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <gsl/gsl_matrix.h> #include <gsl/gsl_blas.h> diff --git a/libcrystfel/src/indexers/xds.c b/libcrystfel/src/indexers/xds.c index 3b2f2b87..3936f791 100644 --- a/libcrystfel/src/indexers/xds.c +++ b/libcrystfel/src/indexers/xds.c @@ -28,10 +28,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - +#include <libcrystfel-config.h> #include <stdlib.h> #include <stdio.h> diff --git a/libcrystfel/src/indexers/xgandalf.c b/libcrystfel/src/indexers/xgandalf.c index 6b09f65c..ada0507a 100644 --- a/libcrystfel/src/indexers/xgandalf.c +++ b/libcrystfel/src/indexers/xgandalf.c @@ -26,9 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include "xgandalf.h" diff --git a/libcrystfel/src/integer_matrix.c b/libcrystfel/src/integer_matrix.c index 7fcd07c4..c6527d82 100644 --- a/libcrystfel/src/integer_matrix.c +++ b/libcrystfel/src/integer_matrix.c @@ -26,9 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <stdio.h> diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c index 84763a08..45f5f677 100644 --- a/libcrystfel/src/integration.c +++ b/libcrystfel/src/integration.c @@ -26,10 +26,7 @@ * */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <assert.h> diff --git a/libcrystfel/src/peakfinder8.c b/libcrystfel/src/peakfinder8.c index 641a154b..93a8cc06 100644 --- a/libcrystfel/src/peakfinder8.c +++ b/libcrystfel/src/peakfinder8.c @@ -29,9 +29,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <float.h> #include <math.h> diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index d55ddd03..689239e5 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -33,9 +33,7 @@ */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <stdio.h> diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c index e5250ba4..b871f43a 100644 --- a/libcrystfel/src/predict-refine.c +++ b/libcrystfel/src/predict-refine.c @@ -27,10 +27,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - +#include <libcrystfel-config.h> #include <stdlib.h> #include <assert.h> diff --git a/libcrystfel/src/rational.c b/libcrystfel/src/rational.c index afffcf47..76aa7014 100644 --- a/libcrystfel/src/rational.c +++ b/libcrystfel/src/rational.c @@ -26,9 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <stdio.h> diff --git a/libcrystfel/src/reflist-utils.c b/libcrystfel/src/reflist-utils.c index 90f7b91b..889b03db 100644 --- a/libcrystfel/src/reflist-utils.c +++ b/libcrystfel/src/reflist-utils.c @@ -27,9 +27,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <math.h> #include <stdio.h> diff --git a/libcrystfel/src/reflist.c b/libcrystfel/src/reflist.c index 90c50e1f..b322e6e1 100644 --- a/libcrystfel/src/reflist.c +++ b/libcrystfel/src/reflist.c @@ -26,9 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <assert.h> diff --git a/libcrystfel/src/spectrum.c b/libcrystfel/src/spectrum.c index bca293e9..78ad2e6e 100644 --- a/libcrystfel/src/spectrum.c +++ b/libcrystfel/src/spectrum.c @@ -26,9 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <assert.h> #include <gsl/gsl_sort.h> diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 68f623dd..89f59ddc 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -31,10 +31,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - +#include <libcrystfel-config.h> #include <stdlib.h> #include <stdio.h> diff --git a/libcrystfel/src/symmetry.c b/libcrystfel/src/symmetry.c index bd6d2e8f..af627c44 100644 --- a/libcrystfel/src/symmetry.c +++ b/libcrystfel/src/symmetry.c @@ -27,9 +27,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdlib.h> #include <stdio.h> diff --git a/libcrystfel/src/thread-pool.c b/libcrystfel/src/thread-pool.c index 61849270..7860d698 100644 --- a/libcrystfel/src/thread-pool.c +++ b/libcrystfel/src/thread-pool.c @@ -26,9 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <stdarg.h> #include <stdlib.h> diff --git a/libcrystfel/src/utils.c b/libcrystfel/src/utils.c index c7c956fa..945fee15 100644 --- a/libcrystfel/src/utils.c +++ b/libcrystfel/src/utils.c @@ -26,9 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <libcrystfel-config.h> #include <libgen.h> #include <math.h> |