Commit 5a2d450b by Maarten L. Hekkelman

refactored configure, merge

parents ea355daf 2165653e
...@@ -23,13 +23,22 @@ ...@@ -23,13 +23,22 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
firstTarget: all firstTarget: all
empty =
space = $(empty) $(empty)
CXX = @CXX@ CXX = @CXX@
CXXFLAGS = @BOOST_CPPFLAGS@ @CXXFLAGS@ @CPPFLAGS@ @PTHREAD_CFLAGS@ @CIFPP_CFLAGS@ CXXFLAGS = @BOOST_CPPFLAGS@ \
LDFLAGS = @BOOST_LDFLAGS@ @LDFLAGS@ @PTHREAD_CFLAGS@ @CXXFLAGS@ \
LIBS = @CIFPP_LIBS@ \ @CPPFLAGS@ \
@BOOST_IOSTREAMS_LIB@ \ @PTHREAD_CFLAGS@ \
@CIFPP_CFLAGS@
LDFLAGS = @BOOST_LDFLAGS@ \
@LDFLAGS@ \
@PTHREAD_CFLAGS@
LIBS = @PTHREAD_LIBS@ \
@CIFPP_LIBS@ \
@BOOST_PROGRAM_OPTIONS_LIB@ \ @BOOST_PROGRAM_OPTIONS_LIB@ \
@BOOST_IOSTREAMS_LIB@ \
@BOOST_DATE_TIME_LIB@ \ @BOOST_DATE_TIME_LIB@ \
@BOOST_REGEX_LIB@ \ @BOOST_REGEX_LIB@ \
@LIBS@ @LIBS@
...@@ -44,23 +53,16 @@ mandir = @mandir@ ...@@ -44,23 +53,16 @@ mandir = @mandir@
GNUmakefile: config.status GNUmakefile.in GNUmakefile: config.status GNUmakefile.in
$(SHELL) ./config.status $(SHELL) ./config.status
ifneq "$(CHECK_CONFIG)" "" # main build variables
PROGRAM = @PACKAGE_NAME@
config.status: configure VERSION = @PACKAGE_VERSION@
$(SHELL) ./config.status --recheck
configure: configure.ac SEARCH_PATHS = src test @LIBCIFPP_DATA_DIR@
autoconf
endif OBJECTS = $(PROGRAM).o
# main build variables RESOURCES = mmcif_pdbx_v50.dic
VERSION = @PACKAGE_VERSION@.0
DEFINES += VERSION='"$(VERSION)"'
CXXFLAGS += -Wall -Wno-multichar
LIBCIFPP_DATA_DIR = @LIBCIFPP_DATA_DIR@
# 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@
...@@ -77,10 +79,9 @@ endif ...@@ -77,10 +79,9 @@ endif
MRC = @MRC@ MRC = @MRC@
USE_RSRC = @USE_RSRC@ USE_RSRC = @USE_RSRC@
# targets VPATH += $(subst $(space),:,$(SEARCH_PATHS))
VPATH += src:test
CXXFLAGS += -Wall -Wno-multichar
CXXFLAGS += $(DEFINES:%=-D%) CXXFLAGS += $(DEFINES:%=-D%)
OBJDIR = obj OBJDIR = obj
...@@ -105,7 +106,7 @@ REVISION_FILE = version-info-$(REVISION).txt ...@@ -105,7 +106,7 @@ REVISION_FILE = version-info-$(REVISION).txt
$(REVISION_FILE): $(REVISION_FILE):
rm -f version-info-*.txt rm -f version-info-*.txt
@ echo dssp-version: $(VERSION) > $@ @ echo $(PROGRAM)-version: $(VERSION) > $@
@ git describe --match=build --dirty >> $@ @ git describe --match=build --dirty >> $@
@ git log --pretty=medium --date=iso8601 -1 >> $@ @ git log --pretty=medium --date=iso8601 -1 >> $@
...@@ -118,45 +119,30 @@ else ...@@ -118,45 +119,30 @@ else
src/revision.hpp: src/revision.hpp:
@ echo 'const char kRevision[] = R"(' > $@ @ echo 'const char kRevision[] = R"(' > $@
@ echo dssp-version: $(VERSION) >> $@ @ echo $(PROGRAM)-version: $(VERSION) >> $@
@ echo Date: $$(date --iso-8601) >> $@ @ echo Date: $$(date --iso-8601) >> $@
@ echo ')";' >> $@ @ echo ')";' >> $@
endif endif
ifneq "$(USE_RSRC)" "0"
rsrc/version.txt: $(REVISION_FILE)
cp $? $@
endif
# The program rules # The program rules
OBJECTS = \
$(OBJDIR)/dssp.o
ifneq "$(USE_RSRC)" "0" ifneq "$(USE_RSRC)" "0"
OBJECTS += $(OBJDIR)/dssp_rsrc.o OBJECTS += $(PROGRAM)_rsrc.o
rsrc: # dictionaries may be found compressed
@ mkdir -p $@ %.dic: %.dic.gz
rsrc/%.dic: $(LIBCIFPP_DATA_DIR)/%.dic.gz | rsrc
gunzip -c $^ > $@ gunzip -c $^ > $@
rsrc/%.dic: $(LIBCIFPP_DATA_DIR)/%.dic | rsrc $(OBJDIR)/$(PROGRAM)_rsrc.o: $(RESOURCES)
ln -fs $(realpath $^) $@
$(OBJDIR)/dssp_rsrc.o: rsrc/mmcif_pdbx_v50.dic
$(MRC) -o $@ $^ $(MRC) -o $@ $^
endif endif
$(OBJDIR)/dssp.o: src/revision.hpp $(OBJDIR)/$(PROGRAM).o: src/revision.hpp
mkdssp: $(OBJECTS) $(PROGRAM): $(OBJECTS:%.o=$(OBJDIR)/%.o)
@ echo '->' $@ @ echo '->' $@
@ $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) $(LIBS) @ $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) $(LIBS)
...@@ -166,17 +152,17 @@ $(OBJDIR)/%.d: $(OBJDIR)/%.o ...@@ -166,17 +152,17 @@ $(OBJDIR)/%.d: $(OBJDIR)/%.o
.PHONY: clean all .PHONY: clean all
clean: clean:
rm -rf mkdssp $(OBJDIR)/* src/revision.hpp rm -rf $(PROGRAM) $(OBJDIR)/* src/revision.hpp
all: mkdssp all: $(PROGRAM)
.PHONY: install .PHONY: install
install: mkdssp install: $(PROGRAM)
install -d $(bindir) install -d $(bindir)
install mkdssp $(bindir)/mkdssp install $(PROGRAM) $(bindir)/$(PROGRAM)
install -d $(mandir)/man1 install -d $(mandir)/man1
install -m 644 mkdssp.1 $(mandir)/man1/mkdssp.1; install -m 644 doc/$(PROGRAM).1 $(mandir)/man1/$(PROGRAM).1;
gzip $(mandir)/man1/mkdssp.1; gzip $(mandir)/man1/$(PROGRAM).1;
.PHONY: FORCE .PHONY: FORCE
FORCE: FORCE:
......
# 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.
#
# Description: m4 macro to detect std::filesystem and optionally the linker flags to use it
AC_DEFUN([AX_FILESYSTEM],
[
AC_CHECK_HEADER([filesystem], [], [AC_MSG_ERROR([The file <filesystem> is missing, perhaps you should install a more recent libstdc++ implementation.])])
dnl check if we need stdc++fs as library
AC_TRY_LINK(
[#include <filesystem>],
[(void)std::filesystem::current_path();],
[],
[
LIBS="$LIBS -lstdc++fs"
AC_TRY_LINK(
[#include <filesystem>],
[(void)std::filesystem::current_path();],
[],
[
AC_MSG_ERROR([Could not link filesystem])
]
)
]
)
])
# 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.
#
# Description: m4 macro to detect std::filesystem and optionally the linker flags to use it
#
# Description: Check for libcifpp
AC_DEFUN([AX_LIBCIFPP],
[
AC_ARG_WITH([cif++],
AS_HELP_STRING([--with-cif++=@<:@location@:>@],
[Use the cif++ library as specified.]),
[
AS_IF([test -d ${withval}/include], [], [
AC_MSG_ERROR(['${withval}'' is not a valid directory for --with-cif++])
])
CIFPP_CFLAGS="-I ${withval}/include"
CIFPP_LIBS="-L${withval}/.libs -lcifpp"
LIBCIFPP_DATA_DIR="${withval}/rsrc"
AC_SUBST([CIFPP_CFLAGS], [$CIFPP_CFLAGS])
AC_SUBST([CIFPP_LIBS], [$CIFPP_LIBS])
])
AS_IF([test "x$CIFPP_LIBS" = "x"], [
if test -x "$PKG_CONFIG"
then
AX_PKG_CHECK_MODULES([CIFPP], [libcifpp], [], [], [AC_MSG_ERROR([the required package libcif++ is not installed])])
LIBCIFPP_DATA_DIR=$(pkg-config --variable=datalibdir libcifpp)
else
AC_CHECK_HEADER(
[cif++/Cif++.hpp],
[
dnl CIFPP_CFLAGS="-I ${withval}/include"
],
[AC_MSG_ERROR([
Can't find the libcif++ header, Config.hpp. Make sure that it
is installed, and either use the --with-cif++ option or install
pkg-config.])])
AX_CHECK_LIBRARY([CIFPP], [cif++/Cif++.hpp], [cifpp],
[
LIBS="-lcifpp $LIBS"
],
[AC_MSG_ERROR([libcif++ not found])])
AS_IF([ test -f /usr/local/share/libcifpp/mmcif_pdbx_v50.dic.gz ], [LIBCIFPP_DATA_DIR=/usr/local/share/libcifpp/ ])
AS_IF([ test -f /var/cache/libcifpp/mmcif_pdbx_v50.dic.gz ], [LIBCIFPP_DATA_DIR=/var/cache/libcifpp ])
fi
])
AC_ARG_VAR([LIBCIFPP_DATA_DIR], [Directory containing mmcif_pdbx_v50.dic file])
AC_SUBST([LIBCIFPP_DATA_DIR], [$LIBCIFPP_DATA_DIR])
])
\ No newline at end of file
# 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.
#
# Description: m4 macro to detect mrc, the resource compiler
AC_DEFUN([AX_MRC],
[
AC_ARG_VAR([MRC], [Specify a location for the mrc executable])
dnl using resources?
USE_RSRC=0
if test "x$MRC" = "x"; then
AC_PATH_PROG([MRC], [mrc])
fi
if test "x$MRC" = "x"; then
AC_MSG_WARN([The mrc application was not found, not using resources.])
else
AC_ARG_ENABLE(
resources,
[AS_HELP_STRING([--disable-resources], [Do not use mrc to store data in resources])])
AS_IF([test "x$enable_resources" != "xno" ], [
USE_RSRC=1
])
fi
AC_SUBST([USE_RSRC], [$USE_RSRC])
AC_DEFINE_UNQUOTED([USE_RSRC], [$USE_RSRC], [Use mrc to store resources])
])
\ No newline at end of file
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for dssp 4.0. # Generated by GNU Autoconf 2.69 for mkdssp 4.0.0.
# #
# Report bugs to <m.hekkelman@nki.nl>. # Report bugs to <m.hekkelman@nki.nl>.
# #
...@@ -578,14 +578,14 @@ MFLAGS= ...@@ -578,14 +578,14 @@ MFLAGS=
MAKEFLAGS= MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='dssp' PACKAGE_NAME='mkdssp'
PACKAGE_TARNAME='dssp' PACKAGE_TARNAME='mkdssp'
PACKAGE_VERSION='4.0' PACKAGE_VERSION='4.0.0'
PACKAGE_STRING='dssp 4.0' PACKAGE_STRING='mkdssp 4.0.0'
PACKAGE_BUGREPORT='m.hekkelman@nki.nl' PACKAGE_BUGREPORT='m.hekkelman@nki.nl'
PACKAGE_URL='' PACKAGE_URL=''
ac_unique_file="src/dssp.cpp" ac_unique_file="src/mkdssp.cpp"
ac_default_prefix=/usr/local ac_default_prefix=/usr/local
# Factoring default headers for most tests. # Factoring default headers for most tests.
ac_includes_default="\ ac_includes_default="\
...@@ -1309,7 +1309,7 @@ if test "$ac_init_help" = "long"; then ...@@ -1309,7 +1309,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures dssp 4.0 to adapt to many kinds of systems. \`configure' configures mkdssp 4.0.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
...@@ -1358,7 +1358,7 @@ Fine tuning of the installation directories: ...@@ -1358,7 +1358,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info] --infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale] --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man] --mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/dssp] --docdir=DIR documentation root [DATAROOTDIR/doc/mkdssp]
--htmldir=DIR html documentation [DOCDIR] --htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR]
...@@ -1375,7 +1375,7 @@ fi ...@@ -1375,7 +1375,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of dssp 4.0:";; short | recursive ) echo "Configuration of mkdssp 4.0.0:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
...@@ -1522,7 +1522,7 @@ fi ...@@ -1522,7 +1522,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
dssp configure 4.0 mkdssp configure 4.0.0
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
...@@ -1945,7 +1945,7 @@ cat >config.log <<_ACEOF ...@@ -1945,7 +1945,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by dssp $as_me 4.0, which was It was created by mkdssp $as_me 4.0.0, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
...@@ -3733,6 +3733,7 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ...@@ -3733,6 +3733,7 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
ac_config_headers="$ac_config_headers src/config.hpp" ac_config_headers="$ac_config_headers src/config.hpp"
...@@ -5546,9 +5547,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ...@@ -5546,9 +5547,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
USE_RSRC=0
if test "x$MRC" = "x"; then USE_RSRC=0
if test "x$MRC" = "x"; then
# Extract the first word of "mrc", so it can be a program name with args. # Extract the first word of "mrc", so it can be a program name with args.
set dummy mrc; ac_word=$2 set dummy mrc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
...@@ -5589,12 +5591,12 @@ $as_echo "no" >&6; } ...@@ -5589,12 +5591,12 @@ $as_echo "no" >&6; }
fi fi
fi fi
if test "x$MRC" = "x"; then 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:${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;} $as_echo "$as_me: WARNING: The mrc application was not found, not using resources." >&2;}
else else
# Check whether --enable-resources was given. # Check whether --enable-resources was given.
if test "${enable_resources+set}" = set; then : if test "${enable_resources+set}" = set; then :
enableval=$enable_resources; enableval=$enable_resources;
...@@ -5606,9 +5608,9 @@ fi ...@@ -5606,9 +5608,9 @@ fi
USE_RSRC=1 USE_RSRC=1
fi fi
fi fi
USE_RSRC=$USE_RSRC USE_RSRC=$USE_RSRC
...@@ -5617,6 +5619,7 @@ cat >>confdefs.h <<_ACEOF ...@@ -5617,6 +5619,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF _ACEOF
# Check whether --enable-revision was given. # Check whether --enable-revision was given.
if test "${enable_revision+set}" = set; then : if test "${enable_revision+set}" = set; then :
enableval=$enable_revision; enableval=$enable_revision;
...@@ -5895,7 +5898,8 @@ fi ...@@ -5895,7 +5898,8 @@ fi
done done
ac_fn_cxx_check_header_mongrel "$LINENO" "filesystem" "ac_cv_header_filesystem" "$ac_includes_default"
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 test "x$ac_cv_header_filesystem" = xyes; then :
else else
...@@ -5904,7 +5908,7 @@ fi ...@@ -5904,7 +5908,7 @@ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <filesystem> #include <filesystem>
int int
...@@ -5950,6 +5954,7 @@ rm -f core conftest.err conftest.$ac_objext \ ...@@ -5950,6 +5954,7 @@ rm -f core conftest.err conftest.$ac_objext \
# Check whether --with-boost was given. # Check whether --with-boost was given.
if test "${with_boost+set}" = set; then : if test "${with_boost+set}" = set; then :
withval=$with_boost; withval=$with_boost;
...@@ -7194,10 +7199,6 @@ fi ...@@ -7194,10 +7199,6 @@ fi
fi fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
# Check whether --with-cif++ was given. # Check whether --with-cif++ was given.
if test "${with_cif__+set}" = set; then : if test "${with_cif__+set}" = set; then :
...@@ -7222,7 +7223,7 @@ fi ...@@ -7222,7 +7223,7 @@ fi
fi fi
if test "x$CIFPP_LIBS" = "x"; then : if test "x$CIFPP_LIBS" = "x"; then :
if test -x "$PKG_CONFIG" if test -x "$PKG_CONFIG"
then then
...@@ -7317,9 +7318,9 @@ if test "x$ac_cv_header_cifpp_Cifpp_hpp" = xyes; then : ...@@ -7317,9 +7318,9 @@ if test "x$ac_cv_header_cifpp_Cifpp_hpp" = xyes; then :
else else
as_fn_error $? " as_fn_error $? "
Can't find the libcif++ header, Config.hpp. Make sure that it Can't find the libcif++ header, Config.hpp. Make sure that it
is installed, and either use the --with-cif++ option or install is installed, and either use the --with-cif++ option or install
pkg-config." "$LINENO" 5 pkg-config." "$LINENO" 5
fi fi
...@@ -7418,7 +7419,8 @@ fi ...@@ -7418,7 +7419,8 @@ fi
fi fi
LIBCIFPP_DATA_DIR=$LIBCIFPP_DATA_DIR LIBCIFPP_DATA_DIR=$LIBCIFPP_DATA_DIR
...@@ -8095,7 +8097,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ...@@ -8095,7 +8097,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by dssp $as_me 4.0, which was This file was extended by mkdssp $as_me 4.0.0, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
...@@ -8157,7 +8159,7 @@ _ACEOF ...@@ -8157,7 +8159,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
dssp config.status 4.0 mkdssp config.status 4.0.0
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"
......
AC_PREREQ([2.69]) AC_PREREQ([2.69])
AC_INIT([dssp], 4.0, [m.hekkelman@nki.nl]) m4_define([dssp_version_major],[4])
m4_define([dssp_version_minor],[0])
m4_define([dssp_version_micro],[0])
m4_define([dssp_version_extra],[])
m4_define([dssp_version],[dssp_version_major().dssp_version_minor().dssp_version_micro()dssp_version_extra])
dnl Switch to a C++ compiler, and check if it works. AC_INIT([mkdssp], [dssp_version], [m.hekkelman@nki.nl])
dnl Switch to a decent 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])
...@@ -11,8 +17,9 @@ AX_CHECK_COMPILE_FLAG([-fstandalone-debug], ...@@ -11,8 +17,9 @@ AX_CHECK_COMPILE_FLAG([-fstandalone-debug],
CXXFLAGS="$CXXFLAGS -fstandalone-debug" CXXFLAGS="$CXXFLAGS -fstandalone-debug"
] , , [-Werror]) ] , , [-Werror])
AC_CONFIG_SRCDIR([src/dssp.cpp]) AC_CONFIG_SRCDIR([src/mkdssp.cpp])
AC_CONFIG_AUX_DIR(config) AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([config/m4])
AC_CONFIG_HEADERS([src/config.hpp]) AC_CONFIG_HEADERS([src/config.hpp])
AC_PREFIX_DEFAULT(/usr/local) AC_PREFIX_DEFAULT(/usr/local)
...@@ -24,30 +31,7 @@ AX_PTHREAD ...@@ -24,30 +31,7 @@ AX_PTHREAD
AC_ARG_VAR([DEBUG], [Build a debug version of the application]) AC_ARG_VAR([DEBUG], [Build a debug version of the application])
AC_ARG_VAR([MRC], [Specify a location for the mrc executable]) AX_MRC
dnl using resources?
USE_RSRC=0
if test "x$MRC" = "x"; then
AC_PATH_PROG([MRC], [mrc])
fi
if test "x$MRC" = "x"; then
AC_MSG_WARN([The mrc application was not found, not using resources.])
else
AC_ARG_ENABLE(
resources,
[AS_HELP_STRING([--disable-resources], [Do not use mrc to store data in resources])])
AS_IF([test "x$enable_resources" != "xno" ], [
USE_RSRC=1
])
fi
AC_SUBST([USE_RSRC], [$USE_RSRC])
AC_DEFINE_UNQUOTED([USE_RSRC], [$USE_RSRC], [Use mrc to store resources])
dnl revision numbering is something used internally at the NKI dnl revision numbering is something used internally at the NKI
AC_ARG_ENABLE( AC_ARG_ENABLE(
...@@ -60,84 +44,14 @@ AS_IF([test "x$enable_revision" != "xno" ], [ ...@@ -60,84 +44,14 @@ AS_IF([test "x$enable_revision" != "xno" ], [
AC_SUBST([UPDATE_REVISION], [$UPDATE_REVISION]) AC_SUBST([UPDATE_REVISION], [$UPDATE_REVISION])
AC_CHECK_HEADER([filesystem], [], [AC_MSG_ERROR([The file <filesystem> is missing, perhaps you should install a more recent libstdc++ implementation.])]) AX_FILESYSTEM
dnl check if we need stdc++fs as library
AC_TRY_LINK(
[#include <filesystem>],
[(void)std::filesystem::current_path();],
[],
[
LIBS="$LIBS -lstdc++fs"
AC_TRY_LINK(
[#include <filesystem>],
[(void)std::filesystem::current_path();],
[],
[
AC_MSG_ERROR([Could not link filesystem])
]
)
]
)
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_PROGRAM_OPTIONS AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_DATE_TIME AX_BOOST_DATE_TIME
AX_BOOST_REGEX AX_BOOST_REGEX
AX_LIBCIFPP
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
dnl Check for libcifpp
AC_ARG_WITH([cif++],
AS_HELP_STRING([--with-cif++=@<:@location@:>@],
[Use the cif++ library as specified.]),
[
AS_IF([test -d ${withval}/include], [], [
AC_MSG_ERROR(['${withval}'' is not a valid directory for --with-cif++])
])
dnl AC_SUBST([CIFPP_CFLAGS], ["-I ${withval}/include"])
dnl AC_SUBST([CIFPP_LIBS], ["-L${withval}/.libs -lcif++"])
CIFPP_CFLAGS="-I ${withval}/include"
CIFPP_LIBS="-L${withval}/.libs -lcifpp"
LIBCIFPP_DATA_DIR="${withval}/rsrc"
AC_SUBST([CIFPP_CFLAGS], [$CIFPP_CFLAGS])
AC_SUBST([CIFPP_LIBS], [$CIFPP_LIBS])
])
AS_IF([test "x$CIFPP_LIBS" = "x"], [
if test -x "$PKG_CONFIG"
then
AX_PKG_CHECK_MODULES([CIFPP], [libcifpp], [], [], [AC_MSG_ERROR([the required package libcif++ is not installed])])
LIBCIFPP_DATA_DIR=$(pkg-config --variable=datalibdir libcifpp)
else
AC_CHECK_HEADER(
[cif++/Cif++.hpp],
[
dnl CIFPP_CFLAGS="-I ${withval}/include"
],
[AC_MSG_ERROR([
Can't find the libcif++ header, Config.hpp. Make sure that it
is installed, and either use the --with-cif++ option or install
pkg-config.])])
AX_CHECK_LIBRARY([CIFPP], [cif++/Cif++.hpp], [cifpp],
[
LIBS="-lcifpp $LIBS"
],
[AC_MSG_ERROR([libcif++ not found])])
AS_IF([ test -f /usr/local/share/libcifpp/mmcif_pdbx_v50.dic.gz ], [LIBCIFPP_DATA_DIR=/usr/local/share/libcifpp/ ])
AS_IF([ test -f /var/cache/libcifpp/mmcif_pdbx_v50.dic.gz ], [LIBCIFPP_DATA_DIR=/var/cache/libcifpp ])
fi
])
AC_ARG_VAR([LIBCIFPP_DATA_DIR], [Directory containing mmcif_pdbx_v50.dic file])
AC_SUBST([LIBCIFPP_DATA_DIR], [$LIBCIFPP_DATA_DIR])
dnl These are still needed outside the Debian environment dnl These are still needed outside the Debian environment
AX_CHECK_LIBRARY([LIBZ], [zlib.h], [z], AX_CHECK_LIBRARY([LIBZ], [zlib.h], [z],
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -76,7 +76,7 @@ void load_version_info() ...@@ -76,7 +76,7 @@ void load_version_info()
const std::regex const std::regex
rxVersionNr(R"(build-(\d+)-g[0-9a-f]{7}(-dirty)?)"), rxVersionNr(R"(build-(\d+)-g[0-9a-f]{7}(-dirty)?)"),
rxVersionDate(R"(Date: +(\d{4}-\d{2}-\d{2}).*)"), rxVersionDate(R"(Date: +(\d{4}-\d{2}-\d{2}).*)"),
rxVersionNr2(R"(dssp-version: (\d+(?:\.\d+)+))"); rxVersionNr2(R"(mkdssp-version: (\d+(?:\.\d+)+))");
#include "revision.hpp" #include "revision.hpp"
......
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