Commit 637ad65e by Maarten L. Hekkelman

updated for locating data directories

parent 9577f427
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
firstTarget: all firstTarget: all
CXX = @CXX@ CXX = @CXX@
CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @PTHREAD_CFLAGS@ @CIFPP_CFLAGS@ @ZEEP_CFLAGS@ CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @PTHREAD_CFLAGS@ @CIFPP_CFLAGS@
LDFLAGS = @LDFLAGS@ @PTHREAD_CFLAGS@ LDFLAGS = @LDFLAGS@ @PTHREAD_CFLAGS@
LIBS = @CIFPP_LIBS@ \ LIBS = @CIFPP_LIBS@ \
@BOOST_IOSTREAMS_LIB@ \ @BOOST_IOSTREAMS_LIB@ \
...@@ -60,14 +60,7 @@ DEFINES += VERSION='"$(VERSION)"' ...@@ -60,14 +60,7 @@ DEFINES += VERSION='"$(VERSION)"'
CXXFLAGS += -Wall -Wno-multichar CXXFLAGS += -Wall -Wno-multichar
CIFPP_RSRC = @CIFPP_RSRC@ LIBCIFPP_DATA_DIR = @LIBCIFPP_DATA_DIR@
ifneq "$(CIFPP_RSRC)" ""
DATADIR = $(CIFPP_RSRC)
else
DATADIR = $(datadir)/libcifpp
endif
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@
...@@ -133,10 +126,7 @@ endif ...@@ -133,10 +126,7 @@ endif
ifneq "$(USE_RSRC)" "0" ifneq "$(USE_RSRC)" "0"
rsrc: rsrc/version.txt: $(REVISION_FILE)
@ mkdir -p $@
rsrc/version.txt: $(REVISION_FILE) | rsrc
cp $? $@ cp $? $@
endif endif
...@@ -148,16 +138,19 @@ OBJECTS = \ ...@@ -148,16 +138,19 @@ OBJECTS = \
ifneq "$(USE_RSRC)" "0" ifneq "$(USE_RSRC)" "0"
rsrc/%.dic: $(DATADIR)/%.dic.gz | rsrc OBJECTS += $(OBJDIR)/dssp_rsrc.o
rsrc:
@ mkdir -p $@
rsrc/%.dic: $(LIBCIFPP_DATA_DIR)/%.dic.gz | rsrc
gzcat $^ > $@ gzcat $^ > $@
rsrc/%.dic: $(DATADIR)/%.dic | rsrc rsrc/%.dic: $(LIBCIFPP_DATA_DIR)/%.dic | rsrc
ln -fs $^ $@ ln -fs $^ $@
$OBJECTS += dssp_rsrc.o
$(OBJDIR)/dssp_rsrc.o: rsrc/mmcif_pdbx_v50.dic $(OBJDIR)/dssp_rsrc.o: rsrc/mmcif_pdbx_v50.dic
$(MRC) -o $$@ $$^ $(MRC) -o $@ $^
endif endif
......
...@@ -629,11 +629,11 @@ LIBBZ2_LDFLAGS ...@@ -629,11 +629,11 @@ LIBBZ2_LDFLAGS
LIBBZ2_CPPFLAGS LIBBZ2_CPPFLAGS
LIBZ_LDFLAGS LIBZ_LDFLAGS
LIBZ_CPPFLAGS LIBZ_CPPFLAGS
LIBCIFPP_DATA_DIR
CIFPP_LDFLAGS CIFPP_LDFLAGS
CIFPP_CPPFLAGS CIFPP_CPPFLAGS
AX_PACKAGE_REQUIRES_PRIVATE AX_PACKAGE_REQUIRES_PRIVATE
AX_PACKAGE_REQUIRES AX_PACKAGE_REQUIRES
CIFPP_RSRC
CIFPP_LIBS CIFPP_LIBS
CIFPP_CFLAGS CIFPP_CFLAGS
BOOST_REGEX_LIB BOOST_REGEX_LIB
...@@ -643,6 +643,10 @@ BOOST_IOSTREAMS_LIB ...@@ -643,6 +643,10 @@ BOOST_IOSTREAMS_LIB
BOOST_LDFLAGS BOOST_LDFLAGS
BOOST_CPPFLAGS BOOST_CPPFLAGS
CXXCPP CXXCPP
UPDATE_REVISION
USE_RSRC
MRC
DEBUG
PTHREAD_CFLAGS PTHREAD_CFLAGS
PTHREAD_LIBS PTHREAD_LIBS
PTHREAD_CC PTHREAD_CC
...@@ -662,10 +666,6 @@ build_os ...@@ -662,10 +666,6 @@ build_os
build_vendor build_vendor
build_cpu build_cpu
build build
UPDATE_REVISION
USE_RSRC
MRC
DEBUG
PKG_CONFIG_LIBDIR PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH PKG_CONFIG_PATH
PKG_CONFIG PKG_CONFIG
...@@ -744,16 +744,17 @@ CCC ...@@ -744,16 +744,17 @@ CCC
PKG_CONFIG PKG_CONFIG
PKG_CONFIG_PATH PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR PKG_CONFIG_LIBDIR
DEBUG
MRC
CC CC
CFLAGS CFLAGS
CPP CPP
DEBUG
MRC
CXXCPP CXXCPP
CIFPP_CFLAGS CIFPP_CFLAGS
CIFPP_LIBS CIFPP_LIBS
CIFPP_CPPFLAGS CIFPP_CPPFLAGS
CIFPP_LDFLAGS CIFPP_LDFLAGS
LIBCIFPP_DATA_DIR
LIBZ_CPPFLAGS LIBZ_CPPFLAGS
LIBZ_LDFLAGS LIBZ_LDFLAGS
LIBBZ2_CPPFLAGS LIBBZ2_CPPFLAGS
...@@ -1382,8 +1383,8 @@ Optional Features: ...@@ -1382,8 +1383,8 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options --disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-resources Use mrc to store data in resources --disable-resources Do not use mrc to store data in resources
--enable-revision Create a build number as revision --disable-revision Create a build number as revision
Optional Packages: Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
...@@ -1431,11 +1432,11 @@ Some influential environment variables: ...@@ -1431,11 +1432,11 @@ Some influential environment variables:
directories to add to pkg-config's search path directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path path overriding pkg-config's built-in search path
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 CXXCPP C++ preprocessor
CIFPP_CFLAGS CIFPP_CFLAGS
C compiler flags for CIFPP, overriding pkg-config C compiler flags for CIFPP, overriding pkg-config
...@@ -1444,6 +1445,8 @@ Some influential environment variables: ...@@ -1444,6 +1445,8 @@ Some influential environment variables:
C preprocessor flags for CIFPP headers C preprocessor flags for CIFPP headers
CIFPP_LDFLAGS CIFPP_LDFLAGS
linker flags for CIFPP libraries linker flags for CIFPP libraries
LIBCIFPP_DATA_DIR
Directory containing mmcif_pdbx_v50.dic file
LIBZ_CPPFLAGS LIBZ_CPPFLAGS
C preprocessor flags for LIBZ headers C preprocessor flags for LIBZ headers
LIBZ_LDFLAGS LIBZ_LDFLAGS
...@@ -3949,217 +3952,6 @@ $as_echo "no" >&6; } ...@@ -3949,217 +3952,6 @@ $as_echo "no" >&6; }
fi fi
fi fi
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}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
fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# 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_ac_pt_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_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_ac_pt_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
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
PKG_CONFIG=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
fi
else
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=0.9.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
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; }
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;}
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 :
USE_RSRC=1
fi
fi
USE_RSRC=$USE_RSRC
cat >>confdefs.h <<_ACEOF
#define USE_RSRC $USE_RSRC
_ACEOF
# Check whether --enable-revision was given.
if test "${enable_revision+set}" = set; then :
enableval=$enable_revision;
fi
if test "x$enable_revision" = "xyes" ; then :
UPDATE_REVISION=1
fi
UPDATE_REVISION=$UPDATE_REVISION
# 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
...@@ -5750,6 +5542,96 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ...@@ -5750,6 +5542,96 @@ 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.
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;}
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 :
USE_RSRC=1
fi
fi
USE_RSRC=$USE_RSRC
cat >>confdefs.h <<_ACEOF
#define USE_RSRC $USE_RSRC
_ACEOF
# Check whether --enable-revision was given.
if test "${enable_revision+set}" = set; then :
enableval=$enable_revision;
fi
if test "x$enable_revision" != "xno" ; then :
UPDATE_REVISION=1
fi
UPDATE_REVISION=$UPDATE_REVISION
ac_ext=cpp ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS' ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
...@@ -7316,6 +7198,7 @@ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ...@@ -7316,6 +7198,7 @@ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" 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 :
withval=$with_cif__; withval=$with_cif__;
...@@ -7329,7 +7212,7 @@ fi ...@@ -7329,7 +7212,7 @@ fi
CIFPP_CFLAGS="-I ${withval}/include" CIFPP_CFLAGS="-I ${withval}/include"
CIFPP_LIBS="-L${withval}/.libs -lcifpp" CIFPP_LIBS="-L${withval}/.libs -lcifpp"
CIFPP_RSRC="${withval}/rsrc" LIBCIFPP_DATA_DIR="${withval}/rsrc"
CIFPP_CFLAGS=$CIFPP_CFLAGS CIFPP_CFLAGS=$CIFPP_CFLAGS
...@@ -7339,9 +7222,6 @@ fi ...@@ -7339,9 +7222,6 @@ fi
fi fi
CIFPP_RSRC=$CIFPP_RSRC
if test "x$CIFPP_LIBS" = "x"; then : if test "x$CIFPP_LIBS" = "x"; then :
if test -x "$PKG_CONFIG" if test -x "$PKG_CONFIG"
...@@ -7412,11 +7292,11 @@ fi ...@@ -7412,11 +7292,11 @@ fi
# Put the nasty error message in config.log where it belongs # Put the nasty error message in config.log where it belongs
echo "$CIFPP_PKG_ERRORS" >&5 echo "$CIFPP_PKG_ERRORS" >&5
as_fn_error $? "the required package libcifpp is not installed" "$LINENO" 5 as_fn_error $? "the required package libcif++ is not installed" "$LINENO" 5
elif test $pkg_failed = untried; then elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; } $as_echo "no" >&6; }
as_fn_error $? "the required package libcifpp is not installed" "$LINENO" 5 as_fn_error $? "the required package libcif++ is not installed" "$LINENO" 5
else else
CIFPP_CFLAGS=$pkg_cv_CIFPP_CFLAGS CIFPP_CFLAGS=$pkg_cv_CIFPP_CFLAGS
CIFPP_LIBS=$pkg_cv_CIFPP_LIBS CIFPP_LIBS=$pkg_cv_CIFPP_LIBS
...@@ -7429,6 +7309,7 @@ fi ...@@ -7429,6 +7309,7 @@ fi
LIBCIFPP_DATA_DIR=$(pkg-config --variable=datalibdir libcifpp)
else else
ac_fn_cxx_check_header_mongrel "$LINENO" "cif++/Cif++.hpp" "ac_cv_header_cifpp_Cifpp_hpp" "$ac_includes_default" 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 : if test "x$ac_cv_header_cifpp_Cifpp_hpp" = xyes; then :
...@@ -7520,17 +7401,27 @@ fi ...@@ -7520,17 +7401,27 @@ fi
$as_echo "#define HAVE_CIFPP 1" >>confdefs.h $as_echo "#define HAVE_CIFPP 1" >>confdefs.h
LIBS="-lcifpp $LIBS" LIBS="-lcifpp $LIBS"
else else
as_fn_error $? "libcif++ not found" "$LINENO" 5 as_fn_error $? "libcif++ not found" "$LINENO" 5
fi fi
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 :
LIBCIFPP_DATA_DIR=/var/cache/libcifpp
fi
fi fi
fi fi
LIBCIFPP_DATA_DIR=$LIBCIFPP_DATA_DIR
......
...@@ -52,9 +52,9 @@ AC_DEFINE_UNQUOTED([USE_RSRC], [$USE_RSRC], [Use mrc to store resources]) ...@@ -52,9 +52,9 @@ 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(
revision, revision,
[AS_HELP_STRING([--enable-revision], [Create a build number as revision])]) [AS_HELP_STRING([--disable-revision], [Create a build number as revision])])
AS_IF([test "x$enable_revision" = "xyes" ], [ AS_IF([test "x$enable_revision" != "xno" ], [
UPDATE_REVISION=1 UPDATE_REVISION=1
]) ])
...@@ -90,6 +90,8 @@ AX_BOOST_REGEX ...@@ -90,6 +90,8 @@ AX_BOOST_REGEX
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
dnl Check for libcifpp
AC_ARG_WITH([cif++], AC_ARG_WITH([cif++],
AS_HELP_STRING([--with-cif++=@<:@location@:>@], AS_HELP_STRING([--with-cif++=@<:@location@:>@],
[Use the cif++ library as specified.]), [Use the cif++ library as specified.]),
...@@ -98,22 +100,21 @@ AC_ARG_WITH([cif++], ...@@ -98,22 +100,21 @@ AC_ARG_WITH([cif++],
AC_MSG_ERROR(['${withval}'' is not a valid directory for --with-cif++]) AC_MSG_ERROR(['${withval}'' is not a valid directory for --with-cif++])
]) ])
dnl AC_SUBST([CIFPP_CFLAGS], ["-I ${withval}/include"]) dnl AC_SUBST([CIFPP_CFLAGS], ["-I ${withval}/include"])
dnl AC_SUBST([CIFPP_LIBS], ["-L${withval}/.libs -lcifpp"]) dnl AC_SUBST([CIFPP_LIBS], ["-L${withval}/.libs -lcif++"])
CIFPP_CFLAGS="-I ${withval}/include" CIFPP_CFLAGS="-I ${withval}/include"
CIFPP_LIBS="-L${withval}/.libs -lcifpp" CIFPP_LIBS="-L${withval}/.libs -lcifpp"
CIFPP_RSRC="${withval}/rsrc" LIBCIFPP_DATA_DIR="${withval}/rsrc"
AC_SUBST([CIFPP_CFLAGS], [$CIFPP_CFLAGS]) AC_SUBST([CIFPP_CFLAGS], [$CIFPP_CFLAGS])
AC_SUBST([CIFPP_LIBS], [$CIFPP_LIBS]) AC_SUBST([CIFPP_LIBS], [$CIFPP_LIBS])
]) ])
AC_SUBST([CIFPP_RSRC], [$CIFPP_RSRC])
AS_IF([test "x$CIFPP_LIBS" = "x"], [ AS_IF([test "x$CIFPP_LIBS" = "x"], [
if test -x "$PKG_CONFIG" if test -x "$PKG_CONFIG"
then then
AX_PKG_CHECK_MODULES([CIFPP], [libcifpp], [], [], [AC_MSG_ERROR([the required package libcifpp is not installed])]) 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 else
AC_CHECK_HEADER( AC_CHECK_HEADER(
[cif++/Cif++.hpp], [cif++/Cif++.hpp],
...@@ -125,23 +126,26 @@ Can't find the libcif++ header, Config.hpp. Make sure that it ...@@ -125,23 +126,26 @@ 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.])]) pkg-config.])])
AX_CHECK_LIBRARY([CIFPP], [cif++/Cif++.hpp], [cifpp], AX_CHECK_LIBRARY([CIFPP], [cif++/Cif++.hpp], [cifpp],
[ [
LIBS="-lcifpp $LIBS" LIBS="-lcifpp $LIBS"
], ],
[AC_MSG_ERROR([libcif++ not found])]) [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/ ])
CIFPP_RSRC="\$(datadir)/libcifpp" AS_IF([ test -f /var/cache/libcifpp/mmcif_pdbx_v50.dic.gz ], [LIBCIFPP_DATA_DIR=/var/cache/libcifpp ])
fi 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],
[ 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])])
AX_CHECK_LIBRARY([LIBBZ2], [bzlib.h], [bz2], 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_SUBST([LIBS], [$LIBS]) AC_SUBST([LIBS], [$LIBS])
......
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