Commit fa5571d6 by Maarten L. Hekkelman

new standard layout

parent 6aca42d1
...@@ -29,20 +29,18 @@ firstTarget: all ...@@ -29,20 +29,18 @@ firstTarget: all
CXX = @CXX@ CXX = @CXX@
CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @BOOST_CPPFLAGS@ @PTHREAD_CFLAGS@ CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @BOOST_CPPFLAGS@ @PTHREAD_CFLAGS@
LDFLAGS = @LDFLAGS@ @BOOST_LDFLAGS@ @PTHREAD_CFLAGS@ LDFLAGS = @LDFLAGS@ @BOOST_LDFLAGS@ @PTHREAD_CFLAGS@
LIBS = -lcif++ \ LIBS = @LIBS@ \
@BOOST_IOSTREAMS_LIB@ \ @BOOST_IOSTREAMS_LIB@ \
@BOOST_THREAD_LIB@ \
@BOOST_REGEX_LIB@ \
@BOOST_PROGRAM_OPTIONS_LIB@ \ @BOOST_PROGRAM_OPTIONS_LIB@ \
@BOOST_DATE_TIME_LIB@ \ @BOOST_DATE_TIME_LIB@
-lboost_timer -lboost_chrono \
-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic \
@LIBS@
prefix = @prefix@ prefix = @prefix@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
libdir = @libdir@ bindir = @bindir@
includedir = @includedir@ datarootdir = @datarootdir@
datadir = @datadir@
ifneq "$(CHECK_CONFIG)" ""
GNUmakefile: config.status GNUmakefile.in GNUmakefile: config.status GNUmakefile.in
$(SHELL) ./config.status $(SHELL) ./config.status
...@@ -53,24 +51,18 @@ config.status: configure ...@@ -53,24 +51,18 @@ config.status: configure
configure: configure.ac configure: configure.ac
autoconf autoconf
endif
# main build variables # main build variables
CXXFLAGS += -Wall -Wno-multichar CXXFLAGS += -Wall -Wno-multichar
PACKAGES += DATADIR = $(datadir)/@PACKAGE_NAME@
ifneq ($(PACKAGES),)
CXXFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags $(PACKAGES))
LDFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs $(PACKAGES) )
endif
LDFLAGS += -static-libgcc DEFINES += DATADIR='"$(DATADIR)"'
# Use the DEBUG flag to build debug versions of the code # Use the DEBUG flag to build debug versions of the code
DEBUG = @DEBUG@ DEBUG = @DEBUG@
VERSION = @PACKAGE_VERSION@
DEFINES += VERSION='"$(VERSION)"'
ifeq "$(DEBUG)" "1" ifeq "$(DEBUG)" "1"
DEFINES += DEBUG DEFINES += DEBUG
CXXFLAGS += -g -O0 CXXFLAGS += -g -O0
...@@ -81,13 +73,9 @@ DEFINES += NDEBUG ...@@ -81,13 +73,9 @@ DEFINES += NDEBUG
endif endif
MRC = @MRC@ MRC = @MRC@
USE_RSRC = @USE_RSRC@
CIFPP_RSRC = @CIFPP_RSRC@ CIFPP_RSRC = @CIFPP_RSRC@
ifneq "$(MRC)" ""
DEFINES += USE_RSRC
endif
# targets # targets
VPATH += src:test VPATH += src:test
...@@ -102,24 +90,55 @@ endif ...@@ -102,24 +90,55 @@ endif
$(OBJDIR): $(OBJDIR):
mkdir -p $(OBJDIR) mkdir -p $(OBJDIR)
APPLICATION = @PACKAGE_NAME@ $(OBJDIR)/%.o: %.cpp | $(OBJDIR)
@ echo ">>" $<
@ $(CXX) -MD -c -o $@ $< $(CFLAGS) $(CXXFLAGS)
OBJECTS = $(APPLICATION:%=$(OBJDIR)/%.o) COMMON_OBJECTS = pr-main.o
ifneq "$(MRC)" "" $(OBJDIR)/pr-main.o: src/revision.hpp
OBJECTS += $(APPLICATION:%=$(OBJDIR)/%_rsrc.o)
$(OBJDIR)/$(APPLICATION)_rsrc.o: $(wildcard $(CIFPP_RSRC)/dictionaries/*) rsrc/version.txt ifneq "$(USE_RSRC)" "0"
$(MRC) -o $@ $(CIFPP_RSRC)/dictionaries rsrc/version.txt COMMON_RSRC = @CIFPP_RSRC@/dictionaries
endif endif
-include $(OBJECTS:%.o=%.d) # The program rules
$(OBJECTS:.o=.d): # disabled for now: centrifuge map-maker
PROGRAMS = dssp
$(OBJDIR)/%.o: %.cpp | $(OBJDIR) GNUmakefile define PROGRAM_template =
@ echo ">>" $<
@ $(CXX) -MD -c -o $@ $< $(CFLAGS) $(CXXFLAGS) $(1)_OBJECTS += $(1).o $(COMMON_OBJECTS)
ifneq "$(USE_RSRC)" "0"
$(1)_OBJECTS += $(1).o $(1)_rsrc.o
$$(OBJDIR)/$(1)_rsrc.o: $$($(1)_RSRC) $$(COMMON_RSRC)
$(MRC) -o $$@ $$^
endif
$(1): $$($(1)_OBJECTS:%=$(OBJDIR)/%)
endef
$(foreach program,$(PROGRAMS),$(eval $(call PROGRAM_template,$(program))))
$(PROGRAMS):
@ echo '->' $@
@ $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) $(LIBS)
OBJECTS = $(sort $(foreach program,$(PROGRAMS),$($(program)_OBJECTS)))
$(OBJDIR)/%.d: $(OBJDIR)/%.o
-include $(OBJECTS:%.o=$(OBJDIR)/%.d)
.PHONY: clean all
clean:
rm -rf $(PROGRAMS) $(OBJDIR)/* $(REVISION_FILE)
all: $(PROGRAMS)
REVISION = $(shell git log --pretty=format:%h --max-count=1) REVISION = $(shell git log --pretty=format:%h --max-count=1)
REVISION_FILE = version-info-$(REVISION).txt REVISION_FILE = version-info-$(REVISION).txt
...@@ -129,31 +148,27 @@ $(REVISION_FILE): $(OBJDIR) src ...@@ -129,31 +148,27 @@ $(REVISION_FILE): $(OBJDIR) src
git describe --match=build --dirty > $@ git describe --match=build --dirty > $@
git log --pretty=medium --date=iso8601 -1 >> $@ git log --pretty=medium --date=iso8601 -1 >> $@
src/revision.hpp: $(REVISION_FILE)
echo 'const char kRevision[] = R"(' > $@
cat $? >> $@
echo ')";' >> $@
rsrc: rsrc:
@ mkdir -p $@ @ mkdir -p $@
rsrc/version.txt: $(REVISION_FILE) | rsrc rsrc/version.txt: $(REVISION_FILE) | rsrc
cp $? $@ cp $? $@
all: $(APPLICATION) .PHONY: install
.PHONY: all install: $(PROGRAMS)
for p in $(PROGRAMS); do install -D $$p $(bindir)/$$p; done
$(APPLICATION): %: $(OBJECTS) for d in mmcif_ddl.dic mmcif_pdbx.dic; do \
@ echo '->' $@ install -D -m644 $(CIFPP_RSRC)/dictionaries/$$d $(DATADIR)/dictionaries/$$d; \
@ $(CXX) -o $@ $^ $(LDFLAGS) $(LIBS) done
.PHONY: clean
clean:
rm -rf $(OBJDIR)/* $(APPLICATION)
.PHONY: distclean
distclean: clean
rm -f config.status config.cache config.log configure.lineno config.status.lineno
rm -f GNUmakefile
.PHONY: FORCE .PHONY: FORCE
FORCE: FORCE:
.PHONY: test .PHONY: test
test: test:
echo $(wildcard $(CIFPP_RSRC)/dictionaries/*) @ echo $(OBJECTS)
...@@ -625,22 +625,23 @@ ac_includes_default="\ ...@@ -625,22 +625,23 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS ac_subst_vars='LTLIBOBJS
LIBOBJS LIBOBJS
HAVE_DLADDR
LIBBZ2_LDFLAGS LIBBZ2_LDFLAGS
LIBBZ2_CPPFLAGS LIBBZ2_CPPFLAGS
LIBZ_LDFLAGS LIBZ_LDFLAGS
LIBZ_CPPFLAGS LIBZ_CPPFLAGS
LIBCIFPP_LDFLAGS
LIBCIFPP_CPPFLAGS
CIFPP_LIB
CIFPP_RSRC
BOOST_DATE_TIME_LIB BOOST_DATE_TIME_LIB
BOOST_PROGRAM_OPTIONS_LIB BOOST_PROGRAM_OPTIONS_LIB
BOOST_REGEX_LIB
BOOST_THREAD_LIB
BOOST_IOSTREAMS_LIB BOOST_IOSTREAMS_LIB
BOOST_LDFLAGS BOOST_LDFLAGS
BOOST_CPPFLAGS BOOST_CPPFLAGS
CXXCPP CXXCPP
LIBCIFPP_LDFLAGS USE_RSRC
LIBCIFPP_CPPFLAGS MRC
CIFPP_RSRC DEBUG
PTHREAD_CFLAGS PTHREAD_CFLAGS
PTHREAD_LIBS PTHREAD_LIBS
PTHREAD_CC PTHREAD_CC
...@@ -660,9 +661,6 @@ build_os ...@@ -660,9 +661,6 @@ build_os
build_vendor build_vendor
build_cpu build_cpu
build build
MRC
PKG_CONFIG
DEBUG
INSTALL_DATA INSTALL_DATA
INSTALL_SCRIPT INSTALL_SCRIPT
INSTALL_PROGRAM INSTALL_PROGRAM
...@@ -716,14 +714,13 @@ SHELL' ...@@ -716,14 +714,13 @@ SHELL'
ac_subst_files='' ac_subst_files=''
ac_user_opts=' ac_user_opts='
enable_option_checking enable_option_checking
with_cif__ enable_resources
with_boost with_boost
with_boost_libdir with_boost_libdir
with_boost_iostreams with_boost_iostreams
with_boost_thread
with_boost_regex
with_boost_program_options with_boost_program_options
with_boost_date_time with_boost_date_time
with_cif__
' '
ac_precious_vars='build_alias ac_precious_vars='build_alias
host_alias host_alias
...@@ -734,14 +731,14 @@ LDFLAGS ...@@ -734,14 +731,14 @@ LDFLAGS
LIBS LIBS
CPPFLAGS CPPFLAGS
CCC CCC
DEBUG
MRC
CC CC
CFLAGS CFLAGS
CPP CPP
DEBUG
MRC
CXXCPP
LIBCIFPP_CPPFLAGS LIBCIFPP_CPPFLAGS
LIBCIFPP_LDFLAGS LIBCIFPP_LDFLAGS
CXXCPP
LIBZ_CPPFLAGS LIBZ_CPPFLAGS
LIBZ_LDFLAGS LIBZ_LDFLAGS
LIBBZ2_CPPFLAGS LIBBZ2_CPPFLAGS
...@@ -1366,10 +1363,15 @@ if test -n "$ac_init_help"; then ...@@ -1366,10 +1363,15 @@ if test -n "$ac_init_help"; then
esac esac
cat <<\_ACEOF cat <<\_ACEOF
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-resources Do not use mrc to store data in resources
Optional Packages: Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-cif++=[location] Use the cif++ library as specified.
--with-boost[=ARG] use Boost library from a standard location --with-boost[=ARG] use Boost library from a standard location
(ARG=yes), from the specified location (ARG=<path>), (ARG=yes), from the specified location (ARG=<path>),
or disable it (ARG=no) [ARG=yes] or disable it (ARG=no) [ARG=yes]
...@@ -1384,14 +1386,6 @@ Optional Packages: ...@@ -1384,14 +1386,6 @@ Optional Packages:
possible to specify a certain library for the linker possible to specify a certain library for the linker
e.g. e.g.
--with-boost-iostreams=boost_iostreams-gcc-mt-d-1_33_1 --with-boost-iostreams=boost_iostreams-gcc-mt-d-1_33_1
--with-boost-thread[=special-lib]
use the Thread library from boost - it is possible
to specify a certain library for the linker e.g.
--with-boost-thread=boost_thread-gcc-mt
--with-boost-regex[=special-lib]
use the Regex library from boost - it is possible to
specify a certain library for the linker e.g.
--with-boost-regex=boost_regex-gcc-mt-d-1_33_1
--with-boost-program-options[=special-lib] --with-boost-program-options[=special-lib]
use the program options library from boost - it is use the program options library from boost - it is
possible to specify a certain library for the linker possible to specify a certain library for the linker
...@@ -1402,6 +1396,7 @@ Optional Packages: ...@@ -1402,6 +1396,7 @@ Optional Packages:
possible to specify a certain library for the linker possible to specify a certain library for the linker
e.g. e.g.
--with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1
--with-cif++=[location] Use the cif++ library as specified.
Some influential environment variables: Some influential environment variables:
CXX C++ compiler command CXX C++ compiler command
...@@ -1411,16 +1406,16 @@ Some influential environment variables: ...@@ -1411,16 +1406,16 @@ Some influential environment variables:
LIBS libraries to pass to the linker, e.g. -l<library> LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir> you have headers in a nonstandard directory <include dir>
DEBUG Build a debug version of the application
MRC Specify a location for the mrc executable
CC C compiler command CC C compiler command
CFLAGS C compiler flags CFLAGS C compiler flags
CPP C preprocessor CPP C preprocessor
DEBUG Build a debug version of the application
MRC Specify a location for the mrc executable
CXXCPP C++ preprocessor
LIBCIFPP_CPPFLAGS LIBCIFPP_CPPFLAGS
C preprocessor flags for LIBCIFPP headers C preprocessor flags for LIBCIFPP headers
LIBCIFPP_LDFLAGS LIBCIFPP_LDFLAGS
linker flags for LIBCIFPP libraries linker flags for LIBCIFPP libraries
CXXCPP C++ preprocessor
LIBZ_CPPFLAGS LIBZ_CPPFLAGS
C preprocessor flags for LIBZ headers C preprocessor flags for LIBZ headers
LIBZ_LDFLAGS LIBZ_LDFLAGS
...@@ -3669,9 +3664,7 @@ fi ...@@ -3669,9 +3664,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags__Werror__fstandalone_debug" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags__Werror__fstandalone_debug" >&5
$as_echo "$ax_cv_check_cxxflags__Werror__fstandalone_debug" >&6; } $as_echo "$ax_cv_check_cxxflags__Werror__fstandalone_debug" >&6; }
if test "x$ax_cv_check_cxxflags__Werror__fstandalone_debug" = xyes; then : if test "x$ax_cv_check_cxxflags__Werror__fstandalone_debug" = xyes; then :
CXXFLAGS="$CXXFLAGS -fstandalone-debug" CXXFLAGS="$CXXFLAGS -fstandalone-debug"
else else
: :
fi fi
...@@ -3708,6 +3701,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ...@@ -3708,6 +3701,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
ac_config_headers="$ac_config_headers src/config.hpp"
# Find a good install program. We prefer a C program (faster), # Find a good install program. We prefer a C program (faster),
...@@ -3804,98 +3800,6 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' ...@@ -3804,98 +3800,6 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$MRC" = "x"; then
# Extract the first word of "mrc", so it can be a program name with args.
set dummy mrc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_MRC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $MRC in
[\\/]* | ?:[\\/]*)
ac_cv_path_MRC="$MRC" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_MRC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
MRC=$ac_cv_path_MRC
if test -n "$MRC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MRC" >&5
$as_echo "$MRC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test "x$MRC" = "x"; then
as_fn_error $? "mrc not found, the application will be built without resources" "$LINENO" 5
fi
# Make sure we can run config.sub. # Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
...@@ -5487,16 +5391,76 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ...@@ -5487,16 +5391,76 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# Check whether --with-cif++ was given.
if test "${with_cif__+set}" = set; then :
withval=$with_cif__;
CPPFLAGS="$CPPFLAGS -I ${withval}/include"
CXXFLAGS="$CXXFLAGS -I ${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/.libs"
CIFPP_RSRC=${withval}/rsrc
if test "x$MRC" = "x"; then
# Extract the first word of "mrc", so it can be a program name with args.
set dummy mrc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_MRC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $MRC in
[\\/]* | ?:[\\/]*)
ac_cv_path_MRC="$MRC" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_MRC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
MRC=$ac_cv_path_MRC
if test -n "$MRC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MRC" >&5
$as_echo "$MRC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test "x$MRC" = "x"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The mrc application was not found, not using resources." >&5
$as_echo "$as_me: WARNING: The mrc application was not found, not using resources." >&2;}
fi
# Check whether --enable-resources was given.
if test "${enable_resources+set}" = set; then :
enableval=$enable_resources;
fi
USE_RSRC=0
if test "x$enable_resources" != "xno"; then :
USE_RSRC=1
fi fi
USE_RSRC=$USE_RSRC
cat >>confdefs.h <<_ACEOF
#define USE_RSRC $USE_RSRC
_ACEOF
ac_ext=cpp ac_ext=cpp
...@@ -5762,115 +5726,33 @@ fi ...@@ -5762,115 +5726,33 @@ fi
done done
ac_fn_cxx_check_header_mongrel "$LINENO" "filesystem" "ac_cv_header_filesystem" "$ac_includes_default"
if test "x$ac_cv_header_filesystem" = xyes; then :
if ${ax_cv_have_LIBCIFPP+:} false; then :
$as_echo_n "(cached) " >&6
else else
save_CPPFLAGS="$CPPFLAGS" as_fn_error $? "The file <filesystem> is missing, perhaps you should install a more recent libstdc++ implementation." "$LINENO" 5
save_LDFLAGS="$LDFLAGS"
save_LIBS="$LIBS"
if test "x$LIBCIFPP_CPPFLAGS" != "x"; then :
CPPFLAGS="$CPPFLAGS $LIBCIFPP_CPPFLAGS"
fi fi
if test "x$LIBCIFPP_LDFLAGS" != "x"; then :
LDFLAGS="$LDFLAGS $LIBCIFPP_LDFLAGS"
fi
ac_fn_cxx_check_header_mongrel "$LINENO" "cif++/Config.hpp" "ac_cv_header_cifpp_Config_hpp" "$ac_includes_default"
if test "x$ac_cv_header_cifpp_Config_hpp" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcif++" >&5
$as_echo_n "checking for main in -lcif++... " >&6; }
if ${ac_cv_lib_cifpp_main+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcif++ $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <filesystem>
int int
main () main ()
{ {
return main (); (void)std::filesystem::current_path();
; ;
return 0; return 0;
} }
_ACEOF _ACEOF
if ac_fn_cxx_try_link "$LINENO"; then : if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_cifpp_main=yes
else
ac_cv_lib_cifpp_main=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cifpp_main" >&5
$as_echo "$ac_cv_lib_cifpp_main" >&6; }
if test "x$ac_cv_lib_cifpp_main" = xyes; then :
ax_cv_have_LIBCIFPP=yes
else
ax_cv_have_LIBCIFPP=no
fi
else
ax_cv_have_LIBCIFPP=no
fi
CPPFLAGS="$save_CPPFLAGS"
LDFLAGS="$save_LDFLAGS"
LIBS="$save_LIBS"
fi
if test "$ax_cv_have_LIBCIFPP" = "yes"; then :
$as_echo "#define HAVE_LIBCIFPP 1" >>confdefs.h
else
as_fn_error $? "libcif++ not found - cannot continue" "$LINENO" 5
fi
ac_fn_cxx_check_header_mongrel "$LINENO" "filesystem" "ac_cv_header_filesystem" "$ac_includes_default"
if test "x$ac_cv_header_filesystem" = xyes; then :
else else
as_fn_error $? "The file <filesystem> is missing, perhaps you should install a more recent libstdc++ implementation." "$LINENO" 5
fi
LIBS="$LIBS -lstdc++fs"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <filesystem>
int
main ()
{
(void)std::filesystem::current_path();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
else
LIBS="$LIBS -lstdc++fs"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <filesystem> #include <filesystem>
int int
...@@ -6202,560 +6084,45 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ...@@ -6202,560 +6084,45 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi fi
if test "x$succeeded" != "xyes" ; then if test "x$succeeded" != "xyes" ; then
if test "x$_version" = "x0" ; then if test "x$_version" = "x0" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version 1.65.1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version 1.65.1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5
$as_echo "$as_me: We could not detect the boost libraries (version 1.65.1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&6;} $as_echo "$as_me: We could not detect the boost libraries (version 1.65.1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&6;}
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: Your boost libraries seems to old (version $_version)." >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: Your boost libraries seems to old (version $_version)." >&5
$as_echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;} $as_echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;}
fi
# execute ACTION-IF-NOT-FOUND (if present):
as_fn_error $? "Could not find a recent version of boost" "$LINENO" 5
else
$as_echo "#define HAVE_BOOST /**/" >>confdefs.h
# execute ACTION-IF-FOUND (if present):
:
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
# Check whether --with-boost-iostreams was given.
if test "${with_boost_iostreams+set}" = set; then :
withval=$with_boost_iostreams;
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_iostreams_lib=""
else
want_boost="yes"
ax_boost_user_iostreams_lib="$withval"
fi
else
want_boost="yes"
fi
if test "x$want_boost" = "xyes"; then
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::IOStreams library is available" >&5
$as_echo_n "checking whether the Boost::IOStreams library is available... " >&6; }
if ${ax_cv_boost_iostreams+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/range/iterator_range.hpp>
int
main ()
{
std::string input = "Hello World!";
namespace io = boost::iostreams;
io::filtering_istream in(boost::make_iterator_range(input));
return 0;
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ax_cv_boost_iostreams=yes
else
ax_cv_boost_iostreams=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_iostreams" >&5
$as_echo "$ax_cv_boost_iostreams" >&6; }
if test "x$ax_cv_boost_iostreams" = "xyes"; then
$as_echo "#define HAVE_BOOST_IOSTREAMS /**/" >>confdefs.h
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'`
if test "x$ax_boost_user_iostreams_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_iostreams*.so* $BOOSTLIBDIR/libboost_iostream*.dylib* $BOOSTLIBDIR/libboost_iostreams*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_iostreams.*\)\.so.*$;\1;' -e 's;^lib\(boost_iostream.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_iostreams.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_IOSTREAMS_LIB="-l$ax_lib"; link_iostreams="yes"; break
else
link_iostreams="no"
fi
done
if test "x$link_iostreams" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_iostreams*.dll* $BOOSTLIBDIR/boost_iostreams*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_iostreams.*\)\.dll.*$;\1;' -e 's;^\(boost_iostreams.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_IOSTREAMS_LIB="-l$ax_lib"; link_iostreams="yes"; break
else
link_iostreams="no"
fi
done
fi
else
for ax_lib in $ax_boost_user_iostreams_lib boost_iostreams-$ax_boost_user_iostreams_lib; do
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_main" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$ax_lib" >&5
$as_echo_n "checking for main in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_IOSTREAMS_LIB="-l$ax_lib"; link_iostreams="yes"; break
else
link_iostreams="no"
fi
done
fi
if test "x$ax_lib" = "x"; then
as_fn_error $? "Could not find a version of the library!" "$LINENO" 5
fi
if test "x$link_iostreams" != "xyes"; then
as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
# Check whether --with-boost-thread was given.
if test "${with_boost_thread+set}" = set; then :
withval=$with_boost_thread;
if test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_thread_lib=""
else
want_boost="yes"
ax_boost_user_thread_lib="$withval"
fi
else
want_boost="yes"
fi
if test "x$want_boost" = "xyes"; then
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::Thread library is available" >&5
$as_echo_n "checking whether the Boost::Thread library is available... " >&6; }
if ${ax_cv_boost_thread+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
CXXFLAGS_SAVE=$CXXFLAGS
if test "x$host_os" = "xsolaris" ; then
CXXFLAGS="-pthreads $CXXFLAGS"
elif test "x$host_os" = "xmingw32" ; then
CXXFLAGS="-mthreads $CXXFLAGS"
else
CXXFLAGS="-pthread $CXXFLAGS"
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <boost/thread/thread.hpp>
int
main ()
{
boost::thread_group thrds;
return 0;
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ax_cv_boost_thread=yes
else
ax_cv_boost_thread=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CXXFLAGS=$CXXFLAGS_SAVE
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_thread" >&5
$as_echo "$ax_cv_boost_thread" >&6; }
if test "x$ax_cv_boost_thread" = "xyes"; then
if test "x$host_os" = "xsolaris" ; then
BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
elif test "x$host_os" = "xmingw32" ; then
BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
else
BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
fi
$as_echo "#define HAVE_BOOST_THREAD /**/" >>confdefs.h
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'`
LDFLAGS_SAVE=$LDFLAGS
case "x$host_os" in
*bsd* )
LDFLAGS="-pthread $LDFLAGS"
break;
;;
esac
if test "x$ax_boost_user_thread_lib" = "x"; then
for libextension in `ls -r $BOOSTLIBDIR/libboost_thread* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'`; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
link_thread="yes"; break
else
link_thread="no"
fi
done
if test "x$link_thread" != "xyes"; then
for libextension in `ls -r $BOOSTLIBDIR/boost_thread* 2>/dev/null | sed 's,.*/,,' | sed 's,\..*,,'`; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
link_thread="yes"; break
else
link_thread="no"
fi
done
fi
else
for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
link_thread="yes"; break
else
link_thread="no"
fi
done
fi
if test "x$ax_lib" = "x"; then
as_fn_error $? "Could not find a version of the library!" "$LINENO" 5
fi fi
if test "x$link_thread" = "xno"; then # execute ACTION-IF-NOT-FOUND (if present):
as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5 as_fn_error $? "Could not find a recent version of boost" "$LINENO" 5
else else
BOOST_THREAD_LIB="-l$ax_lib"
case "x$host_os" in
*bsd* )
BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
break;
;;
xsolaris )
BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread"
break;
;;
xmingw32 )
break;
;;
* )
BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread"
break;
;;
esac
fi $as_echo "#define HAVE_BOOST /**/" >>confdefs.h
# execute ACTION-IF-FOUND (if present):
:
fi fi
CPPFLAGS="$CPPFLAGS_SAVED" CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED" LDFLAGS="$LDFLAGS_SAVED"
fi
fi
# Check whether --with-boost-regex was given.
if test "${with_boost_regex+set}" = set; then : # Check whether --with-boost-iostreams was given.
withval=$with_boost_regex; if test "${with_boost_iostreams+set}" = set; then :
withval=$with_boost_iostreams;
if test "$withval" = "no"; then if test "$withval" = "no"; then
want_boost="no" want_boost="no"
elif test "$withval" = "yes"; then elif test "$withval" = "yes"; then
want_boost="yes" want_boost="yes"
ax_boost_user_regex_lib="" ax_boost_user_iostreams_lib=""
else else
want_boost="yes" want_boost="yes"
ax_boost_user_regex_lib="$withval" ax_boost_user_iostreams_lib="$withval"
fi fi
else else
...@@ -6774,9 +6141,9 @@ fi ...@@ -6774,9 +6141,9 @@ fi
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS export LDFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::Regex library is available" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::IOStreams library is available" >&5
$as_echo_n "checking whether the Boost::Regex library is available... " >&6; } $as_echo_n "checking whether the Boost::IOStreams library is available... " >&6; }
if ${ax_cv_boost_regex+:} false; then : if ${ax_cv_boost_iostreams+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
ac_ext=cpp ac_ext=cpp
...@@ -6787,20 +6154,25 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ...@@ -6787,20 +6154,25 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <boost/regex.hpp> #include <boost/iostreams/filtering_stream.hpp>
#include <boost/range/iterator_range.hpp>
int int
main () main ()
{ {
boost::regex r(); return 0; std::string input = "Hello World!";
namespace io = boost::iostreams;
io::filtering_istream in(boost::make_iterator_range(input));
return 0;
; ;
return 0; return 0;
} }
_ACEOF _ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then : if ac_fn_cxx_try_compile "$LINENO"; then :
ax_cv_boost_regex=yes ax_cv_boost_iostreams=yes
else else
ax_cv_boost_regex=no ax_cv_boost_iostreams=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=cpp ac_ext=cpp
...@@ -6811,15 +6183,15 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ...@@ -6811,15 +6183,15 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_regex" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_iostreams" >&5
$as_echo "$ax_cv_boost_regex" >&6; } $as_echo "$ax_cv_boost_iostreams" >&6; }
if test "x$ax_cv_boost_regex" = "xyes"; then if test "x$ax_cv_boost_iostreams" = "xyes"; then
$as_echo "#define HAVE_BOOST_REGEX /**/" >>confdefs.h $as_echo "#define HAVE_BOOST_IOSTREAMS /**/" >>confdefs.h
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'` BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'`
if test "x$ax_boost_user_regex_lib" = "x"; then if test "x$ax_boost_user_iostreams_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.dylib* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.dylib.*;\1;' -e 's;^lib\(boost_regex.*\)\.a.*$;\1;'` ; do for libextension in `ls $BOOSTLIBDIR/libboost_iostreams*.so* $BOOSTLIBDIR/libboost_iostream*.dylib* $BOOSTLIBDIR/libboost_iostreams*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_iostreams.*\)\.so.*$;\1;' -e 's;^lib\(boost_iostream.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_iostreams.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension} ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh` as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
...@@ -6860,14 +6232,14 @@ eval ac_res=\$$as_ac_Lib ...@@ -6860,14 +6232,14 @@ eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; } $as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break BOOST_IOSTREAMS_LIB="-l$ax_lib"; link_iostreams="yes"; break
else else
link_regex="no" link_iostreams="no"
fi fi
done done
if test "x$link_regex" != "xyes"; then if test "x$link_iostreams" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_regex*.dll* $BOOSTLIBDIR/boost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a.*$;\1;'` ; do for libextension in `ls $BOOSTLIBDIR/boost_iostreams*.dll* $BOOSTLIBDIR/boost_iostreams*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_iostreams.*\)\.dll.*$;\1;' -e 's;^\(boost_iostreams.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension} ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh` as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
...@@ -6908,16 +6280,16 @@ eval ac_res=\$$as_ac_Lib ...@@ -6908,16 +6280,16 @@ eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; } $as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break BOOST_IOSTREAMS_LIB="-l$ax_lib"; link_iostreams="yes"; break
else else
link_regex="no" link_iostreams="no"
fi fi
done done
fi fi
else else
for ax_lib in $ax_boost_user_regex_lib boost_regex-$ax_boost_user_regex_lib; do for ax_lib in $ax_boost_user_iostreams_lib boost_iostreams-$ax_boost_user_iostreams_lib; do
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_main" | $as_tr_sh` as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_main" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$ax_lib" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$ax_lib" >&5
$as_echo_n "checking for main in -l$ax_lib... " >&6; } $as_echo_n "checking for main in -l$ax_lib... " >&6; }
...@@ -6951,17 +6323,18 @@ eval ac_res=\$$as_ac_Lib ...@@ -6951,17 +6323,18 @@ eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; } $as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break BOOST_IOSTREAMS_LIB="-l$ax_lib"; link_iostreams="yes"; break
else else
link_regex="no" link_iostreams="no"
fi fi
done done
fi fi
if test "x$ax_lib" = "x"; then if test "x$ax_lib" = "x"; then
as_fn_error $? "Could not find a version of the Boost::Regex library!" "$LINENO" 5 as_fn_error $? "Could not find a version of the library!" "$LINENO" 5
fi fi
if test "x$link_regex" != "xyes"; then if test "x$link_iostreams" != "xyes"; then
as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5 as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5
fi fi
fi fi
...@@ -7426,6 +6799,104 @@ fi ...@@ -7426,6 +6799,104 @@ fi
# Check whether --with-cif++ was given.
if test "${with_cif__+set}" = set; then :
withval=$with_cif__;
CPPFLAGS="$CPPFLAGS -I ${withval}/include"
CXXFLAGS="$CXXFLAGS -I ${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/.libs"
LIBS="$LIBS -lcif++"
CIFPP_RSRC=${withval}/rsrc
CIFPP_LIB=${withval}/.libs/libcif++.la
fi
if ${ax_cv_have_LIBCIFPP+:} false; then :
$as_echo_n "(cached) " >&6
else
save_CPPFLAGS="$CPPFLAGS"
save_LDFLAGS="$LDFLAGS"
save_LIBS="$LIBS"
if test "x$LIBCIFPP_CPPFLAGS" != "x"; then :
CPPFLAGS="$CPPFLAGS $LIBCIFPP_CPPFLAGS"
fi
if test "x$LIBCIFPP_LDFLAGS" != "x"; then :
LDFLAGS="$LDFLAGS $LIBCIFPP_LDFLAGS"
fi
ac_fn_cxx_check_header_mongrel "$LINENO" "cif++/Config.hpp" "ac_cv_header_cifpp_Config_hpp" "$ac_includes_default"
if test "x$ac_cv_header_cifpp_Config_hpp" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcif++" >&5
$as_echo_n "checking for main in -lcif++... " >&6; }
if ${ac_cv_lib_cifpp_main+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcif++ $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_cifpp_main=yes
else
ac_cv_lib_cifpp_main=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cifpp_main" >&5
$as_echo "$ac_cv_lib_cifpp_main" >&6; }
if test "x$ac_cv_lib_cifpp_main" = xyes; then :
ax_cv_have_LIBCIFPP=yes
else
ax_cv_have_LIBCIFPP=no
fi
else
ax_cv_have_LIBCIFPP=no
fi
CPPFLAGS="$save_CPPFLAGS"
LDFLAGS="$save_LDFLAGS"
LIBS="$save_LIBS"
fi
if test "$ax_cv_have_LIBCIFPP" = "yes"; then :
$as_echo "#define HAVE_LIBCIFPP 1" >>confdefs.h
else
as_fn_error $? "libcif++ not found - cannot continue" "$LINENO" 5
fi
...@@ -7588,69 +7059,6 @@ else ...@@ -7588,69 +7059,6 @@ else
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dladdr1" >&5
$as_echo_n "checking for library containing dladdr1... " >&6; }
if ${ac_cv_search_dladdr1+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char dladdr1 ();
int
main ()
{
return dladdr1 ();
;
return 0;
}
_ACEOF
for ac_lib in '' dl; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_dladdr1=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_dladdr1+:} false; then :
break
fi
done
if ${ac_cv_search_dladdr1+:} false; then :
else
ac_cv_search_dladdr1=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dladdr1" >&5
$as_echo "$ac_cv_search_dladdr1" >&6; }
ac_res=$ac_cv_search_dladdr1
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
$as_echo "#define HAVE_DLADDR 1" >>confdefs.h
fi
ac_config_files="$ac_config_files GNUmakefile" ac_config_files="$ac_config_files GNUmakefile"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
...@@ -7743,43 +7151,7 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix ...@@ -7743,43 +7151,7 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix. # Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# Transform confdefs.h into DEFS. DEFS=-DHAVE_CONFIG_H
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
# take arguments), then branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
ac_script='
:mline
/\\$/{
N
s,\\\n,,
b mline
}
t clear
:clear
s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
t quote
s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
t quote
b any
:quote
s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
s/\[/\\&/g
s/\]/\\&/g
s/\$/$$/g
H
:any
${
g
s/^\n//
s/\n/ /g
p
}
'
DEFS=`sed -n "$ac_script" confdefs.h`
ac_libobjs= ac_libobjs=
ac_ltlibobjs= ac_ltlibobjs=
...@@ -8213,11 +7585,15 @@ case $ac_config_files in *" ...@@ -8213,11 +7585,15 @@ case $ac_config_files in *"
"*) set x $ac_config_files; shift; ac_config_files=$*;; "*) set x $ac_config_files; shift; ac_config_files=$*;;
esac esac
case $ac_config_headers in *"
"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for. # Files that config.status was made for.
config_files="$ac_config_files" config_files="$ac_config_files"
config_headers="$ac_config_headers"
_ACEOF _ACEOF
...@@ -8238,10 +7614,15 @@ Usage: $0 [OPTION]... [TAG]... ...@@ -8238,10 +7614,15 @@ Usage: $0 [OPTION]... [TAG]...
--recheck update $as_me by reconfiguring in the same conditions --recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE] --file=FILE[:TEMPLATE]
instantiate the configuration file FILE instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
instantiate the configuration header FILE
Configuration files: Configuration files:
$config_files $config_files
Configuration headers:
$config_headers
Report bugs to <m.hekkelman@nki.nl>." Report bugs to <m.hekkelman@nki.nl>."
_ACEOF _ACEOF
...@@ -8303,7 +7684,18 @@ do ...@@ -8303,7 +7684,18 @@ do
esac esac
as_fn_append CONFIG_FILES " '$ac_optarg'" as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;; ac_need_defaults=false;;
--he | --h | --help | --hel | -h ) --header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;; $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s) | -silent | --silent | --silen | --sile | --sil | --si | --s)
...@@ -8359,6 +7751,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ...@@ -8359,6 +7751,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
for ac_config_target in $ac_config_targets for ac_config_target in $ac_config_targets
do do
case $ac_config_target in case $ac_config_target in
"src/config.hpp") CONFIG_HEADERS="$CONFIG_HEADERS src/config.hpp" ;;
"GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;; "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
...@@ -8372,6 +7765,7 @@ done ...@@ -8372,6 +7765,7 @@ done
# bizarre bug on SunOS 4.1.3. # bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
fi fi
# Have a temporary directory for convenience. Make it in the build tree # Have a temporary directory for convenience. Make it in the build tree
...@@ -8559,8 +7953,116 @@ fi ...@@ -8559,8 +7953,116 @@ fi
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES" fi # test -n "$CONFIG_FILES"
# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
# Transform confdefs.h into an awk script `defines.awk', embedded as
# here-document in config.status, that substitutes the proper values into
# config.h.in to produce config.h.
# Create a delimiter string that does not exist in confdefs.h, to ease
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
if test -z "$ac_tt"; then
break
elif $ac_last_try; then
as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
done
# For the awk script, D is an array of macro values keyed by name,
# likewise P contains macro parameters if any. Preserve backslash
# newline sequences.
ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
sed -n '
s/.\{148\}/&'"$ac_delim"'/g
t rset
:rset
s/^[ ]*#[ ]*define[ ][ ]*/ /
t def
d
:def
s/\\$//
t bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3"/p
s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
d
:bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3\\\\\\n"\\/p
t cont
s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
t cont
d
:cont
n
s/.\{148\}/&'"$ac_delim"'/g
t clear
:clear
s/\\$//
t bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/"/p
d
:bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
b cont
' <confdefs.h | sed '
s/'"$ac_delim"'/"\\\
"/g' >>$CONFIG_STATUS || ac_write_fail=1
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
for (key in D) D_is_set[key] = 1
FS = ""
}
/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
line = \$ 0
split(line, arg, " ")
if (arg[1] == "#") {
defundef = arg[2]
mac1 = arg[3]
} else {
defundef = substr(arg[1], 2)
mac1 = arg[2]
}
split(mac1, mac2, "(") #)
macro = mac2[1]
prefix = substr(line, 1, index(line, defundef) - 1)
if (D_is_set[macro]) {
# Preserve the white space surrounding the "#".
print prefix "define", macro P[macro] D[macro]
next
} else {
# Replace #undef with comments. This is necessary, for example,
# in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
if (defundef == "undef") {
print "/*", prefix defundef, macro, "*/"
next
}
}
}
{ print }
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
eval set X " :F $CONFIG_FILES " eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
shift shift
for ac_tag for ac_tag
do do
...@@ -8773,7 +8275,30 @@ which seems to be undefined. Please make sure it is defined" >&2;} ...@@ -8773,7 +8275,30 @@ which seems to be undefined. Please make sure it is defined" >&2;}
esac \ esac \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;; ;;
:H)
#
# CONFIG_HEADER
#
if test x"$ac_file" != x-; then
{
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
} >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
;;
esac esac
......
AC_PREREQ([2.69])
AC_INIT([dssp], 4.0, [m.hekkelman@nki.nl]) AC_INIT([dssp], 4.0, [m.hekkelman@nki.nl])
dnl Switch to a C++ compiler, and check if it works. dnl Switch to a C++ compiler, and check if it works.
AC_LANG(C++) AC_LANG(C++)
AX_CXX_COMPILE_STDCXX_17([noext]) AX_CXX_COMPILE_STDCXX_17([noext])
AX_CHECK_COMPILE_FLAG([-fstandalone-debug], AX_CHECK_COMPILE_FLAG([-fstandalone-debug], [ CXXFLAGS="$CXXFLAGS -fstandalone-debug" ], , [-Werror])
[
CXXFLAGS="$CXXFLAGS -fstandalone-debug"
] , , [-Werror])
AC_CONFIG_SRCDIR([src/dssp.cpp]) AC_CONFIG_SRCDIR([src/dssp.cpp])
AC_CONFIG_AUX_DIR(config) AC_CONFIG_AUX_DIR(config)
dnl AC_CONFIG_MACRO_DIR([config/m4]) AC_CONFIG_MACRO_DIR([config/m4])
AC_CONFIG_HEADERS([src/config.hpp])
AC_PREFIX_DEFAULT(/usr/local) AC_PREFIX_DEFAULT(/usr/local)
AC_PROG_INSTALL AC_PROG_INSTALL
AC_ARG_VAR([DEBUG], [Build a debug version of the application]) AX_PTHREAD
AC_PATH_PROG([PKG_CONFIG], [pkg-config]) AC_ARG_VAR([DEBUG], [Build a debug version of the application])
AC_ARG_VAR([MRC], [Specify a location for the mrc executable]) AC_ARG_VAR([MRC], [Specify a location for the mrc executable])
...@@ -29,24 +29,20 @@ if test "x$MRC" = "x"; then ...@@ -29,24 +29,20 @@ if test "x$MRC" = "x"; then
fi fi
if test "x$MRC" = "x"; then if test "x$MRC" = "x"; then
AC_MSG_ERROR([mrc not found, the application will be built without resources]) AC_MSG_WARN([The mrc application was not found, not using resources.])
fi fi
AX_PTHREAD AC_ARG_ENABLE(
resources,
[AS_HELP_STRING([--disable-resources], [Do not use mrc to store data in resources])])
AC_ARG_WITH([cif++], USE_RSRC=0
AS_HELP_STRING([--with-cif++=@<:@location@:>@], AS_IF([test "x$enable_resources" != "xno"], [
[Use the cif++ library as specified.]), USE_RSRC=1
[ ])
CPPFLAGS="$CPPFLAGS -I ${withval}/include" AC_SUBST([USE_RSRC], [$USE_RSRC])
CXXFLAGS="$CXXFLAGS -I ${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/.libs"
AC_SUBST([CIFPP_RSRC], [${withval}/rsrc])
])
AX_CHECK_LIBRARY([LIBCIFPP], [cif++/Config.hpp], [cif++], AC_DEFINE_UNQUOTED([USE_RSRC], [$USE_RSRC], [Use mrc to store resources])
[],
[AC_MSG_ERROR([libcif++ not found - cannot continue])])
AC_CHECK_HEADER([filesystem], [], [AC_MSG_ERROR([The file <filesystem> is missing, perhaps you should install a more recent libstdc++ implementation.])]) AC_CHECK_HEADER([filesystem], [], [AC_MSG_ERROR([The file <filesystem> is missing, perhaps you should install a more recent libstdc++ implementation.])])
...@@ -71,11 +67,25 @@ AC_TRY_LINK( ...@@ -71,11 +67,25 @@ AC_TRY_LINK(
AX_BOOST_BASE([1.65.1], [], [AC_MSG_ERROR([Could not find a recent version of boost])]) AX_BOOST_BASE([1.65.1], [], [AC_MSG_ERROR([Could not find a recent version of boost])])
AX_BOOST_IOSTREAMS AX_BOOST_IOSTREAMS
AX_BOOST_THREAD
AX_BOOST_REGEX
AX_BOOST_PROGRAM_OPTIONS AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_DATE_TIME AX_BOOST_DATE_TIME
AC_ARG_WITH([cif++],
AS_HELP_STRING([--with-cif++=@<:@location@:>@],
[Use the cif++ library as specified.]),
[
CPPFLAGS="$CPPFLAGS -I ${withval}/include"
CXXFLAGS="$CXXFLAGS -I ${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/.libs"
LIBS="$LIBS -lcif++"
AC_SUBST([CIFPP_RSRC], [${withval}/rsrc])
AC_SUBST([CIFPP_LIB], [${withval}/.libs/libcif++.la])
])
AX_CHECK_LIBRARY([LIBCIFPP], [cif++/Config.hpp], [cif++],
[],
[AC_MSG_ERROR([libcif++ not found - cannot continue])])
AX_CHECK_LIBRARY([LIBZ], [zlib.h], [z], AX_CHECK_LIBRARY([LIBZ], [zlib.h], [z],
[ LIBS="$LIBS -lz" ], [ LIBS="$LIBS -lz" ],
[AC_MSG_ERROR([libz not found - compressed files not supported])]) [AC_MSG_ERROR([libz not found - compressed files not supported])])
...@@ -83,12 +93,5 @@ AX_CHECK_LIBRARY([LIBBZ2], [bzlib.h], [bz2], ...@@ -83,12 +93,5 @@ AX_CHECK_LIBRARY([LIBBZ2], [bzlib.h], [bz2],
[ LIBS="$LIBS -lbz2"], [ LIBS="$LIBS -lbz2"],
[AC_MSG_ERROR([libbz2 not found - compressed files not supported])]) [AC_MSG_ERROR([libbz2 not found - compressed files not supported])])
AC_SEARCH_LIBS([dladdr1], [dl],
[
AC_DEFINE([HAVE_DLADDR], 1, [Define if the system has dladdr])
], [], [])
AC_SUBST([HAVE_DLADDR])
dnl Process Makefile.in to create Makefile dnl Process Makefile.in to create Makefile
AC_OUTPUT([GNUmakefile]) AC_OUTPUT([GNUmakefile])
...@@ -24,9 +24,12 @@ ...@@ -24,9 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "dssp.hpp"
#include <exception> #include <exception>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <filesystem>
#include <boost/format.hpp> #include <boost/format.hpp>
#include <boost/date_time/gregorian/formatters.hpp> #include <boost/date_time/gregorian/formatters.hpp>
...@@ -36,9 +39,6 @@ ...@@ -36,9 +39,6 @@
#include <cif++/Secondary.hpp> #include <cif++/Secondary.hpp>
#include <cif++/CifUtils.hpp> #include <cif++/CifUtils.hpp>
#include <cif++/Cif2PDB.hpp> #include <cif++/Cif2PDB.hpp>
#include <cif++/FixDMC.hpp>
#include <zeep/streambuf.hpp>
#include <boost/program_options.hpp> #include <boost/program_options.hpp>
#include <boost/iostreams/filter/gzip.hpp> #include <boost/iostreams/filter/gzip.hpp>
...@@ -49,78 +49,7 @@ namespace fs = std::filesystem; ...@@ -49,78 +49,7 @@ namespace fs = std::filesystem;
namespace io = boost::iostreams; namespace io = boost::iostreams;
namespace po = boost::program_options; namespace po = boost::program_options;
// -------------------------------------------------------------------- extern std::string VERSION_STRING;
// recursively print exception whats:
void print_what (const std::exception& e)
{
std::cerr << e.what() << std::endl;
try
{
std::rethrow_if_nested(e);
}
catch (const std::exception& nested)
{
std::cerr << " >> ";
print_what(nested);
}
}
// --------------------------------------------------------------------
namespace {
std::string gVersionNr, gVersionDate, VERSION_STRING;
}
void load_version_info()
{
const std::regex
rxVersionNr(R"(build-(\d+)-g[0-9a-f]{7}(-dirty)?)"),
rxVersionDate(R"(Date: +(\d{4}-\d{2}-\d{2}).*)");
auto version = cif::rsrc_loader::load("version.txt");
if (not version)
VERSION_STRING = "unknown version, version resource is missing";
else
{
zeep::char_streambuf buffer(version.data(), version.size());
std::istream is(&buffer);
std::string line;
while (getline(is, line))
{
std::smatch m;
if (std::regex_match(line, m, rxVersionNr))
{
gVersionNr = m[1];
if (m[2].matched)
gVersionNr += '*';
continue;
}
if (regex_match(line, m, rxVersionDate))
{
gVersionDate = m[1];
continue;
}
}
if (not VERSION_STRING.empty())
VERSION_STRING += "\n";
VERSION_STRING += gVersionNr + " " + gVersionDate;
}
}
std::string get_version_nr()
{
return gVersionNr;
}
std::string get_version_date()
{
return gVersionDate;
}
// -------------------------------------------------------------------- // --------------------------------------------------------------------
...@@ -465,7 +394,7 @@ void annotateDSSP(mmcif::Structure& structure, const mmcif::DSSP& dssp, std::ost ...@@ -465,7 +394,7 @@ void annotateDSSP(mmcif::Structure& structure, const mmcif::DSSP& dssp, std::ost
} }
} }
db.add_software("dssp " VERSION, "other", get_version_nr(), get_version_date()); db.add_software("dssp " PACKAGE_VERSION, "other", get_version_nr(), get_version_date());
db.write(os); db.write(os);
...@@ -677,7 +606,7 @@ void annotateDSSP(mmcif::Structure& structure, const mmcif::DSSP& dssp, std::ost ...@@ -677,7 +606,7 @@ void annotateDSSP(mmcif::Structure& structure, const mmcif::DSSP& dssp, std::ost
// -------------------------------------------------------------------- // --------------------------------------------------------------------
int d_main(int argc, const char* argv[]) int pr_main(int argc, char* argv[])
{ {
using namespace std::literals; using namespace std::literals;
...@@ -726,7 +655,7 @@ int d_main(int argc, const char* argv[]) ...@@ -726,7 +655,7 @@ int d_main(int argc, const char* argv[])
if (vm.count("version")) if (vm.count("version"))
{ {
std::cout << argv[0] << ' ' << VERSION " version " << VERSION_STRING << std::endl; std::cout << argv[0] << ' ' << PACKAGE_VERSION " version " << VERSION_STRING << std::endl;
exit(0); exit(0);
} }
...@@ -831,32 +760,3 @@ int d_main(int argc, const char* argv[]) ...@@ -831,32 +760,3 @@ int d_main(int argc, const char* argv[])
return 0; return 0;
} }
// --------------------------------------------------------------------
int main(int argc, const char* argv[])
{
int result = 0;
try
{
cif::rsrc_loader::init({
#if USE_RSRC
{ cif::rsrc_loader_type::mrsrc, "", { gResourceIndex, gResourceData, gResourceName } },
#endif
{ cif::rsrc_loader_type::file, "." }
});
load_version_info();
result = d_main(argc, argv);
}
catch (const std::exception& ex)
{
print_what(ex);
exit(1);
}
return result;
}
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2020 NKI/AVL, Netherlands Cancer Institute
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include <string>
#include "config.hpp"
extern std::string VERSION_STRING;
std::string get_version_nr();
std::string get_version_date();
/* include/cif++/Config.hpp. Generated from Config.hpp.in by configure. */
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2020 NKI/AVL, Netherlands Cancer Institute
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "dssp.hpp"
#include <sys/time.h>
#include <sys/resource.h>
#include <stdexcept>
#include <iostream>
#include <iomanip>
#include <chrono>
#include <cmath>
#include <regex>
#include "cif++/Cif++.hpp"
#include "cif++/CifUtils.hpp"
std::string VERSION_STRING;
int pr_main(int argc, char* argv[]);
// --------------------------------------------------------------------
std::ostream& operator<<(std::ostream& os, const struct timeval& t)
{
uint64_t s = t.tv_sec;
if (s > 24 * 60 * 60)
{
uint32_t days = s / (24 * 60 * 60);
os << days << "d ";
s %= 24 * 60 * 60;
}
if (s > 60 * 60)
{
uint32_t hours = s / (60 * 60);
os << hours << "h ";
s %= 60 * 60;
}
if (s > 60)
{
uint32_t minutes = s / 60;
os << minutes << "m ";
s %= 60;
}
double ss = s + 1e-6 * t.tv_usec;
os << std::fixed << std::setprecision(1) << ss << 's';
return os;
}
std::ostream& operator<<(std::ostream& os, const std::chrono::duration<double>& t)
{
uint64_t s = static_cast<uint64_t>(std::trunc(t.count()));
if (s > 24 * 60 * 60)
{
uint32_t days = s / (24 * 60 * 60);
os << days << "d ";
s %= 24 * 60 * 60;
}
if (s > 60 * 60)
{
uint32_t hours = s / (60 * 60);
os << hours << "h ";
s %= 60 * 60;
}
if (s > 60)
{
uint32_t minutes = s / 60;
os << minutes << "m ";
s %= 60;
}
double ss = s + 1e-6 * (t.count() - s);
os << std::fixed << std::setprecision(1) << ss << 's';
return os;
}
class RUsage
{
public:
~RUsage()
{
if (cif::VERBOSE)
{
struct rusage u;
auto end = std::chrono::system_clock::now();
std::chrono::duration<double> diff = end - start;
if (getrusage(RUSAGE_SELF, &u) == 0)
std::cerr << "CPU usage: "
<< u.ru_utime << " user, "
<< u.ru_stime << " system, "
<< diff << " wall" << std::endl;
else
perror("Failed to get rusage");
}
}
std::chrono::time_point<std::chrono::system_clock> start = std::chrono::system_clock::now();
};
// --------------------------------------------------------------------
namespace {
std::string gVersionNr, gVersionDate;
}
void load_version_info()
{
const std::regex
rxVersionNr(R"(build-(\d+)-g[0-9a-f]{7}(-dirty)?)"),
rxVersionDate(R"(Date: +(\d{4}-\d{2}-\d{2}).*)");
#include "revision.hpp"
struct membuf : public std::streambuf
{
membuf(char* data, size_t length) { this->setg(data, data, data + length); }
} buffer(const_cast<char*>(kRevision), sizeof(kRevision));
std::istream is(&buffer);
std::string line;
while (getline(is, line))
{
std::smatch m;
if (std::regex_match(line, m, rxVersionNr))
{
gVersionNr = m[1];
if (m[2].matched)
gVersionNr += '*';
continue;
}
if (std::regex_match(line, m, rxVersionDate))
{
gVersionDate = m[1];
continue;
}
}
if (not VERSION_STRING.empty())
VERSION_STRING += "\n";
VERSION_STRING += gVersionNr + " " + gVersionDate;
}
std::string get_version_nr()
{
return gVersionNr;
}
std::string get_version_date()
{
return gVersionDate;
}
// --------------------------------------------------------------------
// recursively print exception whats:
void print_what (const std::exception& e)
{
std::cerr << e.what() << std::endl;
try
{
std::rethrow_if_nested(e);
}
catch (const std::exception& nested)
{
std::cerr << " >> ";
print_what(nested);
}
}
int main(int argc, char* argv[])
{
int result = -1;
RUsage r;
try
{
cif::rsrc_loader::init({
{ cif::rsrc_loader_type::file, "." },
#if defined DATADIR
{ cif::rsrc_loader_type::file, DATADIR },
#endif
#if USE_RSRC
{ cif::rsrc_loader_type::mrsrc, "", { gResourceIndex, gResourceData, gResourceName } }
#endif
});
load_version_info();
result = pr_main(argc, argv);
}
catch (std::exception& ex)
{
print_what(ex);
exit(1);
}
return result;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment