Commit 9f57e08d by Maarten L. Hekkelman

license added

parent 5bcd6b64
# Makefile for example app using libzeep # SPDX-License-Identifier: BSD-2-Clause
# #
# Copyright Maarten L. Hekkelman, UMC St. Radboud 2008-2013. # Copyright (c) 2020 NKI/AVL, Netherlands Cancer Institute
# Copyright Maarten L. Hekkelman, 2014-2019
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# #
# Use the make.config file in the uplevel directory to # Redistribution and use in source and binary forms, with or without
# change the settings for this build # 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.
SHELL := /bin/bash SHELL := /bin/bash
...@@ -21,6 +34,7 @@ LIBS = -lcif++ \ ...@@ -21,6 +34,7 @@ LIBS = -lcif++ \
@BOOST_THREAD_LIB@ \ @BOOST_THREAD_LIB@ \
@BOOST_REGEX_LIB@ \ @BOOST_REGEX_LIB@ \
@BOOST_PROGRAM_OPTIONS_LIB@ \ @BOOST_PROGRAM_OPTIONS_LIB@ \
@BOOST_DATE_TIME_LIB@ \
-lboost_timer -lboost_chrono \ -lboost_timer -lboost_chrono \
-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic \ -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic \
@LIBS@ @LIBS@
...@@ -59,7 +73,7 @@ DEFINES += VERSION='"$(VERSION)"' ...@@ -59,7 +73,7 @@ DEFINES += VERSION='"$(VERSION)"'
ifeq "$(DEBUG)" "1" ifeq "$(DEBUG)" "1"
DEFINES += DEBUG DEFINES += DEBUG
CXXFLAGS += -g -O0 -fstandalone-debug CXXFLAGS += -g -O0
LDFLAGS += -g LDFLAGS += -g
else else
CXXFLAGS += -O2 CXXFLAGS += -O2
......
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.
\ No newline at end of file
...@@ -630,9 +630,7 @@ LIBBZ2_LDFLAGS ...@@ -630,9 +630,7 @@ LIBBZ2_LDFLAGS
LIBBZ2_CPPFLAGS LIBBZ2_CPPFLAGS
LIBZ_LDFLAGS LIBZ_LDFLAGS
LIBZ_CPPFLAGS LIBZ_CPPFLAGS
LIBCLIPPER_LDFLAGS BOOST_DATE_TIME_LIB
LIBCLIPPER_CPPFLAGS
CCP4
BOOST_PROGRAM_OPTIONS_LIB BOOST_PROGRAM_OPTIONS_LIB
BOOST_REGEX_LIB BOOST_REGEX_LIB
BOOST_THREAD_LIB BOOST_THREAD_LIB
...@@ -725,8 +723,7 @@ with_boost_iostreams ...@@ -725,8 +723,7 @@ with_boost_iostreams
with_boost_thread with_boost_thread
with_boost_regex with_boost_regex
with_boost_program_options with_boost_program_options
with_clipper with_boost_date_time
with_newuoa
' '
ac_precious_vars='build_alias ac_precious_vars='build_alias
host_alias host_alias
...@@ -745,9 +742,6 @@ CPP ...@@ -745,9 +742,6 @@ CPP
LIBCIFPP_CPPFLAGS LIBCIFPP_CPPFLAGS
LIBCIFPP_LDFLAGS LIBCIFPP_LDFLAGS
CXXCPP CXXCPP
CCP4
LIBCLIPPER_CPPFLAGS
LIBCLIPPER_LDFLAGS
LIBZ_CPPFLAGS LIBZ_CPPFLAGS
LIBZ_LDFLAGS LIBZ_LDFLAGS
LIBBZ2_CPPFLAGS LIBBZ2_CPPFLAGS
...@@ -1403,11 +1397,11 @@ Optional Packages: ...@@ -1403,11 +1397,11 @@ 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-program-options=boost_program_options-gcc-mt-1_33_1 --with-boost-program-options=boost_program_options-gcc-mt-1_33_1
--with-clipper=[location] --with-boost-date-time[=special-lib]
Use the clipper library as specified. use the Date_Time library from boost - it is
[location=$CCP4] possible to specify a certain library for the linker
--with-newuoa=[location] e.g.
Use the newuoa library as specified. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1
Some influential environment variables: Some influential environment variables:
CXX C++ compiler command CXX C++ compiler command
...@@ -1427,11 +1421,6 @@ Some influential environment variables: ...@@ -1427,11 +1421,6 @@ Some influential environment variables:
LIBCIFPP_LDFLAGS LIBCIFPP_LDFLAGS
linker flags for LIBCIFPP libraries linker flags for LIBCIFPP libraries
CXXCPP C++ preprocessor CXXCPP C++ preprocessor
CCP4 The location where CCP4 is installed
LIBCLIPPER_CPPFLAGS
C preprocessor flags for LIBCLIPPER headers
LIBCLIPPER_LDFLAGS
linker flags for LIBCLIPPER libraries
LIBZ_CPPFLAGS LIBZ_CPPFLAGS
C preprocessor flags for LIBZ headers C preprocessor flags for LIBZ headers
LIBZ_LDFLAGS LIBZ_LDFLAGS
...@@ -3650,6 +3639,44 @@ $as_echo "#define HAVE_CXX17 1" >>confdefs.h ...@@ -3650,6 +3639,44 @@ $as_echo "#define HAVE_CXX17 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -fstandalone-debug" >&5
$as_echo_n "checking whether C++ compiler accepts -fstandalone-debug... " >&6; }
if ${ax_cv_check_cxxflags__Werror__fstandalone_debug+:} false; then :
$as_echo_n "(cached) " >&6
else
ax_check_save_flags=$CXXFLAGS
CXXFLAGS="$CXXFLAGS -Werror -fstandalone-debug"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ax_cv_check_cxxflags__Werror__fstandalone_debug=yes
else
ax_cv_check_cxxflags__Werror__fstandalone_debug=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CXXFLAGS=$ax_check_save_flags
fi
{ $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; }
if test "x$ax_cv_check_cxxflags__Werror__fstandalone_debug" = xyes; then :
CXXFLAGS="$CXXFLAGS -fstandalone-debug"
else
:
fi
ac_aux_dir= ac_aux_dir=
for ac_dir in config "$srcdir"/config; do for ac_dir in config "$srcdir"/config; do
...@@ -7170,146 +7197,232 @@ fi ...@@ -7170,146 +7197,232 @@ fi
# Check whether --with-boost-date-time was given.
if test "${with_boost_date_time+set}" = set; then :
withval=$with_boost_date_time;
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_date_time_lib=""
else
want_boost="yes"
ax_boost_user_date_time_lib="$withval"
fi
if test x"$CCP4" != x""; then : else
want_boost="yes"
CPPFLAGS="$CPPFLAGS -I ${CCP4}/include"
CXXFLAGS="$CXXFLAGS -I ${CCP4}/include"
LDFLAGS="$LDFLAGS -L${CCP4}/lib -Wl,-rpath=${CCP4}/lib"
fi fi
if test "x$want_boost" = "xyes"; then
# Check whether --with-clipper was given. CPPFLAGS_SAVED="$CPPFLAGS"
if test "${with_clipper+set}" = set; then : CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
withval=$with_clipper; export CPPFLAGS
CPPFLAGS="$CPPFLAGS -I ${withval}/include"
CXXFLAGS="$CXXFLAGS -I ${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/lib"
LIBS="$LIBS -lclipper-ccp4 -lclipper-minimol -lclipper-mmdb -lclipper-cns -lclipper-phs -lclipper-contrib -lclipper-core"
fi LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::Date_Time library is available" >&5
$as_echo_n "checking whether the Boost::Date_Time library is available... " >&6; }
if ${ax_cv_boost_date_time+:} 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
ac_fn_cxx_check_header_mongrel "$LINENO" "clipper/clipper.h" "ac_cv_header_clipper_clipper_h" "$ac_includes_default" cat confdefs.h - <<_ACEOF >conftest.$ac_ext
if test "x$ac_cv_header_clipper_clipper_h" = xyes; then : /* end confdefs.h. */
#include <boost/date_time/gregorian/gregorian_types.hpp>
int
main ()
{
using namespace boost::gregorian; date d(2002,Jan,10);
return 0;
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ax_cv_boost_date_time=yes
else else
as_fn_error $? " ax_cv_boost_date_time=no
Can't find the main clipper include file clipper/clipper.h. Please
specify either the CCP4 location of the location of the installed
clipper using --with-clipper=<path>
" "$LINENO" 5
fi 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_date_time" >&5
$as_echo "$ax_cv_boost_date_time" >&6; }
if test "x$ax_cv_boost_date_time" = "xyes"; then
$as_echo "#define HAVE_BOOST_DATE_TIME /**/" >>confdefs.h
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'`
if test "x$ax_boost_user_date_time_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_date_time*.so* $BOOSTLIBDIR/libboost_date_time*.dylib* $BOOSTLIBDIR/libboost_date_time*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_date_time.*\)\.so.*$;\1;' -e 's;^lib\(boost_date_time.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_date_time.*\)\.a*$;\1;'` ; do
if ${ax_cv_have_LIBCLIPPER+:} false; then : 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 $as_echo_n "(cached) " >&6
else else
save_CPPFLAGS="$CPPFLAGS" ac_check_lib_save_LIBS=$LIBS
save_LDFLAGS="$LDFLAGS" LIBS="-l$ax_lib $LIBS"
save_LIBS="$LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
if test "x$LIBCLIPPER_CPPFLAGS" != "x"; then : /* Override any GCC internal prototype to avoid an error.
CPPFLAGS="$CPPFLAGS $LIBCLIPPER_CPPFLAGS" 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 fi
rm -f core conftest.err conftest.$ac_objext \
if test "x$LIBCLIPPER_LDFLAGS" != "x"; then : conftest$ac_exeext conftest.$ac_ext
LDFLAGS="$LDFLAGS $LIBCLIPPER_LDFLAGS" 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_DATE_TIME_LIB="-l$ax_lib"; link_date_time="yes"; break
else
link_date_time="no"
fi fi
ac_fn_cxx_check_header_mongrel "$LINENO" "clipper/clipper.h" "ac_cv_header_clipper_clipper_h" "$ac_includes_default" done
if test "x$ac_cv_header_clipper_clipper_h" = xyes; then : if test "x$link_date_time" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_date_time*.dll* $BOOSTLIBDIR/boost_date_time*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_date_time.*\)\.dll.*$;\1;' -e 's;^\(boost_date_time.*\)\.a.*$;\1;'` ; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lclipper-core" >&5 ax_lib=${libextension}
$as_echo_n "checking for main in -lclipper-core... " >&6; } as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
if ${ac_cv_lib_clipper_core_main+:} false; then : { $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 $as_echo_n "(cached) " >&6
else else
ac_check_lib_save_LIBS=$LIBS ac_check_lib_save_LIBS=$LIBS
LIBS="-lclipper-core $LIBS" LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* 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 int
main () main ()
{ {
return main (); return exit ();
; ;
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_clipper_core_main=yes eval "$as_ac_Lib=yes"
else else
ac_cv_lib_clipper_core_main=no eval "$as_ac_Lib=no"
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS LIBS=$ac_check_lib_save_LIBS
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clipper_core_main" >&5 eval ac_res=\$$as_ac_Lib
$as_echo "$ac_cv_lib_clipper_core_main" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
if test "x$ac_cv_lib_clipper_core_main" = xyes; then : $as_echo "$ac_res" >&6; }
ax_cv_have_LIBCLIPPER=yes if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_DATE_TIME_LIB="-l$ax_lib"; link_date_time="yes"; break
else else
ax_cv_have_LIBCLIPPER=no link_date_time="no"
fi fi
done
fi
else
for ax_lib in $ax_boost_user_date_time_lib boost_date_time-$ax_boost_user_date_time_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 else
ax_cv_have_LIBCLIPPER=no ac_check_lib_save_LIBS=$LIBS
fi LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
CPPFLAGS="$save_CPPFLAGS"
LDFLAGS="$save_LDFLAGS"
LIBS="$save_LIBS"
fi
if test "$ax_cv_have_LIBCLIPPER" = "yes"; then :
$as_echo "#define HAVE_LIBCLIPPER 1" >>confdefs.h
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else else
as_fn_error $? "libclipper not found - cannot continue" "$LINENO" 5 eval "$as_ac_Lib=no"
fi fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
# Check whether --with-newuoa was given.
if test "${with_newuoa+set}" = set; then :
withval=$with_newuoa;
CPPFLAGS="$CPPFLAGS -I ${withval}/include"
CXXFLAGS="$CXXFLAGS -I ${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/lib"
LIBS="$LIBS -lnewuoa"
fi fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
ac_fn_cxx_check_header_mongrel "$LINENO" "newuoa.h" "ac_cv_header_newuoa_h" "$ac_includes_default" $as_echo "$ac_res" >&6; }
if test "x$ac_cv_header_newuoa_h" = xyes; then : if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_DATE_TIME_LIB="-l$ax_lib"; link_date_time="yes"; break
else else
as_fn_error $? " link_date_time="no"
Can't find the newuoa include file newuoa.h. Please install this
library and specify its location with --with-newuoa=<path>.
You can find newuoa at https://github.com/elsid/newuoa-cpp.git
" "$LINENO" 5
fi 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_date_time" != "xyes"; then
as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
...@@ -7538,7 +7651,6 @@ fi ...@@ -7538,7 +7651,6 @@ fi
ac_config_files="$ac_config_files GNUmakefile" ac_config_files="$ac_config_files GNUmakefile"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
......
...@@ -4,6 +4,11 @@ dnl Switch to a C++ compiler, and check if it works. ...@@ -4,6 +4,11 @@ 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],
[
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]) dnl AC_CONFIG_MACRO_DIR([config/m4])
...@@ -69,59 +74,7 @@ AX_BOOST_IOSTREAMS ...@@ -69,59 +74,7 @@ AX_BOOST_IOSTREAMS
AX_BOOST_THREAD AX_BOOST_THREAD
AX_BOOST_REGEX AX_BOOST_REGEX
AX_BOOST_PROGRAM_OPTIONS AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_DATE_TIME
AC_ARG_VAR([CCP4], [The location where CCP4 is installed])
AS_IF([test x"$CCP4" != x""],
[
CPPFLAGS="$CPPFLAGS -I ${CCP4}/include"
CXXFLAGS="$CXXFLAGS -I ${CCP4}/include"
LDFLAGS="$LDFLAGS -L${CCP4}/lib -Wl,-rpath=${CCP4}/lib"
])
AC_ARG_WITH([clipper],
AS_HELP_STRING([--with-clipper=@<:@location@:>@],
[Use the clipper library as specified.
@<:@location=$CCP4@:>@]),
[
CPPFLAGS="$CPPFLAGS -I ${withval}/include"
CXXFLAGS="$CXXFLAGS -I ${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/lib"
LIBS="$LIBS -lclipper-ccp4 -lclipper-minimol -lclipper-mmdb -lclipper-cns -lclipper-phs -lclipper-contrib -lclipper-core"
])
AC_CHECK_HEADER(
[clipper/clipper.h],
[],
[AC_MSG_ERROR([
Can't find the main clipper include file clipper/clipper.h. Please
specify either the CCP4 location of the location of the installed
clipper using --with-clipper=<path>
])])
AX_CHECK_LIBRARY([LIBCLIPPER], [clipper/clipper.h], [clipper-core],
[],
[AC_MSG_ERROR([libclipper not found - cannot continue])])
AC_ARG_WITH([newuoa],
AS_HELP_STRING([--with-newuoa=@<:@location@:>@],
[Use the newuoa library as specified.]),
[
CPPFLAGS="$CPPFLAGS -I ${withval}/include"
CXXFLAGS="$CXXFLAGS -I ${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/lib"
LIBS="$LIBS -lnewuoa"
])
AC_CHECK_HEADER(
[newuoa.h],
[],
[AC_MSG_ERROR([
Can't find the newuoa include file newuoa.h. Please install this
library and specify its location with --with-newuoa=<path>.
You can find newuoa at https://github.com/elsid/newuoa-cpp.git
])])
AX_CHECK_LIBRARY([LIBZ], [zlib.h], [z], AX_CHECK_LIBRARY([LIBZ], [zlib.h], [z],
[ LIBS="$LIBS -lz" ], [ LIBS="$LIBS -lz" ],
...@@ -137,20 +90,5 @@ AC_SEARCH_LIBS([dladdr1], [dl], ...@@ -137,20 +90,5 @@ AC_SEARCH_LIBS([dladdr1], [dl],
AC_SUBST([HAVE_DLADDR]) AC_SUBST([HAVE_DLADDR])
dnl AC_MSG_CHECKING([clipper version])
dnl AC_COMPILE_IFELSE(
dnl [read_test(clipper-test.cpp)],
dnl [],
dnl [AC_MSG_ERROR([The version of clipper is not up to date])])
dnl
dnl AC_CHECK_HEADER(
dnl [newuoa.h],
dnl [],
dnl [AC_MSG_ERROR([
dnl Can't find the newuoa include file newuoa.h. Please install this
dnl library and specify its location with --with-newuoa=<path>.
dnl You can find newuoa at https://github.com/elsid/newuoa-cpp.git
dnl ])])
dnl Process Makefile.in to create Makefile dnl Process Makefile.in to create Makefile
AC_OUTPUT([GNUmakefile]) AC_OUTPUT([GNUmakefile])
// Copyright Maarten L. Hekkelman 2020 /*-
// Distributed under the Boost Software License, Version 1.0. * SPDX-License-Identifier: BSD-2-Clause
// (See accompanying file LICENSE_1_0.txt or copy at *
// http://www.boost.org/LICENSE_1_0.txt) * 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 <exception> #include <exception>
#include <iostream> #include <iostream>
...@@ -673,7 +694,7 @@ int d_main(int argc, const char* argv[]) ...@@ -673,7 +694,7 @@ int d_main(int argc, const char* argv[])
("output-format", po::value<std::string>(), "Output format, can be either 'dssp' for classic DSSP or 'mmcif' for annotated mmCIF. The default is chosen based on the extension of the output file, if any.") ("output-format", po::value<std::string>(), "Output format, can be either 'dssp' for classic DSSP or 'mmcif' for annotated mmCIF. The default is chosen based on the extension of the output file, if any.")
("create-missing", "Create missing backbone atoms") // ("create-missing", "Create missing backbone atoms")
#if not USE_RSRC #if not USE_RSRC
("rsrc-dir", po::value<std::string>(), "Directory containing the 'resources' used by this application") ("rsrc-dir", po::value<std::string>(), "Directory containing the 'resources' used by this application")
...@@ -742,10 +763,10 @@ int d_main(int argc, const char* argv[]) ...@@ -742,10 +763,10 @@ int d_main(int argc, const char* argv[])
mmcif::File f(vm["xyzin"].as<std::string>()); mmcif::File f(vm["xyzin"].as<std::string>());
mmcif::Structure structure(f, 1, mmcif::StructureOpenOptions::SkipHydrogen); mmcif::Structure structure(f, 1, mmcif::StructureOpenOptions::SkipHydrogen);
// -------------------------------------------------------------------- // // --------------------------------------------------------------------
if (vm.count("create-missing")) // if (vm.count("create-missing"))
mmcif::CreateMissingBackboneAtoms(structure, true); // mmcif::CreateMissingBackboneAtoms(structure, true);
// -------------------------------------------------------------------- // --------------------------------------------------------------------
......
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