Commit 5a2d450b by Maarten L. Hekkelman

refactored configure, merge

parents ea355daf 2165653e
......@@ -23,13 +23,22 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
firstTarget: all
empty =
space = $(empty) $(empty)
CXX = @CXX@
CXXFLAGS = @BOOST_CPPFLAGS@ @CXXFLAGS@ @CPPFLAGS@ @PTHREAD_CFLAGS@ @CIFPP_CFLAGS@
LDFLAGS = @BOOST_LDFLAGS@ @LDFLAGS@ @PTHREAD_CFLAGS@
LIBS = @CIFPP_LIBS@ \
@BOOST_IOSTREAMS_LIB@ \
CXXFLAGS = @BOOST_CPPFLAGS@ \
@CXXFLAGS@ \
@CPPFLAGS@ \
@PTHREAD_CFLAGS@ \
@CIFPP_CFLAGS@
LDFLAGS = @BOOST_LDFLAGS@ \
@LDFLAGS@ \
@PTHREAD_CFLAGS@
LIBS = @PTHREAD_LIBS@ \
@CIFPP_LIBS@ \
@BOOST_PROGRAM_OPTIONS_LIB@ \
@BOOST_IOSTREAMS_LIB@ \
@BOOST_DATE_TIME_LIB@ \
@BOOST_REGEX_LIB@ \
@LIBS@
......@@ -44,26 +53,19 @@ mandir = @mandir@
GNUmakefile: config.status GNUmakefile.in
$(SHELL) ./config.status
ifneq "$(CHECK_CONFIG)" ""
# main build variables
PROGRAM = @PACKAGE_NAME@
config.status: configure
$(SHELL) ./config.status --recheck
VERSION = @PACKAGE_VERSION@
configure: configure.ac
autoconf
SEARCH_PATHS = src test @LIBCIFPP_DATA_DIR@
endif
OBJECTS = $(PROGRAM).o
# main build variables
VERSION = @PACKAGE_VERSION@.0
DEFINES += VERSION='"$(VERSION)"'
CXXFLAGS += -Wall -Wno-multichar
LIBCIFPP_DATA_DIR = @LIBCIFPP_DATA_DIR@
RESOURCES = mmcif_pdbx_v50.dic
# Use the DEBUG flag to build debug versions of the code
DEBUG = @DEBUG@
DEBUG = @DEBUG@
ifeq "$(DEBUG)" "1"
DEFINES += DEBUG
......@@ -77,10 +79,9 @@ endif
MRC = @MRC@
USE_RSRC = @USE_RSRC@
# targets
VPATH += src:test
VPATH += $(subst $(space),:,$(SEARCH_PATHS))
CXXFLAGS += -Wall -Wno-multichar
CXXFLAGS += $(DEFINES:%=-D%)
OBJDIR = obj
......@@ -105,7 +106,7 @@ REVISION_FILE = version-info-$(REVISION).txt
$(REVISION_FILE):
rm -f version-info-*.txt
@ echo dssp-version: $(VERSION) > $@
@ echo $(PROGRAM)-version: $(VERSION) > $@
@ git describe --match=build --dirty >> $@
@ git log --pretty=medium --date=iso8601 -1 >> $@
......@@ -118,45 +119,30 @@ else
src/revision.hpp:
@ echo 'const char kRevision[] = R"(' > $@
@ echo dssp-version: $(VERSION) >> $@
@ echo $(PROGRAM)-version: $(VERSION) >> $@
@ echo Date: $$(date --iso-8601) >> $@
@ echo ')";' >> $@
endif
ifneq "$(USE_RSRC)" "0"
rsrc/version.txt: $(REVISION_FILE)
cp $? $@
endif
# The program rules
OBJECTS = \
$(OBJDIR)/dssp.o
ifneq "$(USE_RSRC)" "0"
OBJECTS += $(OBJDIR)/dssp_rsrc.o
OBJECTS += $(PROGRAM)_rsrc.o
rsrc:
@ mkdir -p $@
rsrc/%.dic: $(LIBCIFPP_DATA_DIR)/%.dic.gz | rsrc
# dictionaries may be found compressed
%.dic: %.dic.gz
gunzip -c $^ > $@
rsrc/%.dic: $(LIBCIFPP_DATA_DIR)/%.dic | rsrc
ln -fs $(realpath $^) $@
$(OBJDIR)/dssp_rsrc.o: rsrc/mmcif_pdbx_v50.dic
$(OBJDIR)/$(PROGRAM)_rsrc.o: $(RESOURCES)
$(MRC) -o $@ $^
endif
$(OBJDIR)/dssp.o: src/revision.hpp
$(OBJDIR)/$(PROGRAM).o: src/revision.hpp
mkdssp: $(OBJECTS)
$(PROGRAM): $(OBJECTS:%.o=$(OBJDIR)/%.o)
@ echo '->' $@
@ $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) $(LIBS)
......@@ -166,17 +152,17 @@ $(OBJDIR)/%.d: $(OBJDIR)/%.o
.PHONY: clean all
clean:
rm -rf mkdssp $(OBJDIR)/* src/revision.hpp
rm -rf $(PROGRAM) $(OBJDIR)/* src/revision.hpp
all: mkdssp
all: $(PROGRAM)
.PHONY: install
install: mkdssp
install: $(PROGRAM)
install -d $(bindir)
install mkdssp $(bindir)/mkdssp
install $(PROGRAM) $(bindir)/$(PROGRAM)
install -d $(mandir)/man1
install -m 644 mkdssp.1 $(mandir)/man1/mkdssp.1;
gzip $(mandir)/man1/mkdssp.1;
install -m 644 doc/$(PROGRAM).1 $(mandir)/man1/$(PROGRAM).1;
gzip $(mandir)/man1/$(PROGRAM).1;
.PHONY: 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
# 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>.
#
......@@ -578,14 +578,14 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='dssp'
PACKAGE_TARNAME='dssp'
PACKAGE_VERSION='4.0'
PACKAGE_STRING='dssp 4.0'
PACKAGE_NAME='mkdssp'
PACKAGE_TARNAME='mkdssp'
PACKAGE_VERSION='4.0.0'
PACKAGE_STRING='mkdssp 4.0.0'
PACKAGE_BUGREPORT='m.hekkelman@nki.nl'
PACKAGE_URL=''
ac_unique_file="src/dssp.cpp"
ac_unique_file="src/mkdssp.cpp"
ac_default_prefix=/usr/local
# Factoring default headers for most tests.
ac_includes_default="\
......@@ -1309,7 +1309,7 @@ if test "$ac_init_help" = "long"; then
# 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.
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]...
......@@ -1358,7 +1358,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--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]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
......@@ -1375,7 +1375,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of dssp 4.0:";;
short | recursive ) echo "Configuration of mkdssp 4.0.0:";;
esac
cat <<\_ACEOF
......@@ -1522,7 +1522,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
dssp configure 4.0
mkdssp configure 4.0.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1945,7 +1945,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
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
$ $0 $@
......@@ -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_config_headers="$ac_config_headers src/config.hpp"
......@@ -5546,10 +5547,11 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
USE_RSRC=0
if test "x$MRC" = "x"; then
# Extract the first word of "mrc", so it can be a program name with args.
USE_RSRC=0
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; }
......@@ -5589,26 +5591,26 @@ $as_echo "no" >&6; }
fi
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
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;}
else
# Check whether --enable-resources was given.
else
# Check whether --enable-resources was given.
if test "${enable_resources+set}" = set; then :
enableval=$enable_resources;
fi
if test "x$enable_resources" != "xno" ; then :
if test "x$enable_resources" != "xno" ; then :
USE_RSRC=1
USE_RSRC=1
fi
fi
fi
USE_RSRC=$USE_RSRC
USE_RSRC=$USE_RSRC
......@@ -5617,6 +5619,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
# Check whether --enable-revision was given.
if test "${enable_revision+set}" = set; then :
enableval=$enable_revision;
......@@ -5895,7 +5898,8 @@ fi
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 :
else
......@@ -5904,7 +5908,7 @@ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <filesystem>
int
......@@ -5919,9 +5923,9 @@ if ac_fn_cxx_try_link "$LINENO"; then :
else
LIBS="$LIBS -lstdc++fs"
LIBS="$LIBS -lstdc++fs"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <filesystem>
int
......@@ -5936,7 +5940,7 @@ if ac_fn_cxx_try_link "$LINENO"; then :
else
as_fn_error $? "Could not link filesystem" "$LINENO" 5
as_fn_error $? "Could not link filesystem" "$LINENO" 5
fi
......@@ -5950,6 +5954,7 @@ rm -f core conftest.err conftest.$ac_objext \
# Check whether --with-boost was given.
if test "${with_boost+set}" = set; then :
withval=$with_boost;
......@@ -7194,38 +7199,34 @@ fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
# Check whether --with-cif++ was given.
if test "${with_cif__+set}" = set; then :
withval=$with_cif__;
if test -d ${withval}/include; then :
if test -d ${withval}/include; then :
else
as_fn_error $? "'${withval}'' is not a valid directory for --with-cif++" "$LINENO" 5
as_fn_error $? "'${withval}'' is not a valid directory for --with-cif++" "$LINENO" 5
fi
CIFPP_CFLAGS="-I ${withval}/include"
CIFPP_LIBS="-L${withval}/.libs -lcifpp"
LIBCIFPP_DATA_DIR="${withval}/rsrc"
CIFPP_CFLAGS="-I ${withval}/include"
CIFPP_LIBS="-L${withval}/.libs -lcifpp"
LIBCIFPP_DATA_DIR="${withval}/rsrc"
CIFPP_CFLAGS=$CIFPP_CFLAGS
CIFPP_CFLAGS=$CIFPP_CFLAGS
CIFPP_LIBS=$CIFPP_LIBS
CIFPP_LIBS=$CIFPP_LIBS
fi
if test "x$CIFPP_LIBS" = "x"; then :
if test "x$CIFPP_LIBS" = "x"; then :
if test -x "$PKG_CONFIG"
then
if test -x "$PKG_CONFIG"
then
......@@ -7309,17 +7310,17 @@ fi
LIBCIFPP_DATA_DIR=$(pkg-config --variable=datalibdir libcifpp)
else
ac_fn_cxx_check_header_mongrel "$LINENO" "cif++/Cif++.hpp" "ac_cv_header_cifpp_Cifpp_hpp" "$ac_includes_default"
LIBCIFPP_DATA_DIR=$(pkg-config --variable=datalibdir libcifpp)
else
ac_fn_cxx_check_header_mongrel "$LINENO" "cif++/Cif++.hpp" "ac_cv_header_cifpp_Cifpp_hpp" "$ac_includes_default"
if test "x$ac_cv_header_cifpp_Cifpp_hpp" = xyes; then :
else
as_fn_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." "$LINENO" 5
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." "$LINENO" 5
fi
......@@ -7401,24 +7402,25 @@ fi
$as_echo "#define HAVE_CIFPP 1" >>confdefs.h
LIBS="-lcifpp $LIBS"
LIBS="-lcifpp $LIBS"
else
as_fn_error $? "libcif++ not found" "$LINENO" 5
fi
if test -f /usr/local/share/libcifpp/mmcif_pdbx_v50.dic.gz ; then :
if test -f /usr/local/share/libcifpp/mmcif_pdbx_v50.dic.gz ; then :
LIBCIFPP_DATA_DIR=/usr/local/share/libcifpp/
fi
if test -f /var/cache/libcifpp/mmcif_pdbx_v50.dic.gz ; then :
if test -f /var/cache/libcifpp/mmcif_pdbx_v50.dic.gz ; then :
LIBCIFPP_DATA_DIR=/var/cache/libcifpp
fi
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
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
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
CONFIG_FILES = $CONFIG_FILES
......@@ -8157,7 +8159,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
dssp config.status 4.0
mkdssp config.status 4.0.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
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++)
AX_CXX_COMPILE_STDCXX_17([noext])
......@@ -11,8 +17,9 @@ AX_CHECK_COMPILE_FLAG([-fstandalone-debug],
CXXFLAGS="$CXXFLAGS -fstandalone-debug"
] , , [-Werror])
AC_CONFIG_SRCDIR([src/dssp.cpp])
AC_CONFIG_SRCDIR([src/mkdssp.cpp])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([config/m4])
AC_CONFIG_HEADERS([src/config.hpp])
AC_PREFIX_DEFAULT(/usr/local)
......@@ -24,30 +31,7 @@ AX_PTHREAD
AC_ARG_VAR([DEBUG], [Build a debug version of the application])
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])
AX_MRC
dnl revision numbering is something used internally at the NKI
AC_ARG_ENABLE(
......@@ -60,84 +44,14 @@ AS_IF([test "x$enable_revision" != "xno" ], [
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.])])
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_FILESYSTEM
AX_BOOST_BASE([1.65.1], [], [AC_MSG_ERROR([Could not find a recent version of boost])])
AX_BOOST_IOSTREAMS
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_DATE_TIME
AX_BOOST_REGEX
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])
AX_LIBCIFPP
dnl These are still needed outside the Debian environment
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()
const std::regex
rxVersionNr(R"(build-(\d+)-g[0-9a-f]{7}(-dirty)?)"),
rxVersionDate(R"(Date: +(\d{4}-\d{2}-\d{2}).*)"),
rxVersionNr2(R"(dssp-version: (\d+(?:\.\d+)+))");
rxVersionNr2(R"(mkdssp-version: (\d+(?:\.\d+)+))");
#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