Commit afa96444 by Maarten L. Hekkelman

update configure and makefile

parent a24eb9ee
...@@ -39,11 +39,11 @@ bindir = @bindir@ ...@@ -39,11 +39,11 @@ bindir = @bindir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
datadir = @datadir@ datadir = @datadir@
ifneq "$(CHECK_CONFIG)" ""
GNUmakefile: config.status GNUmakefile.in GNUmakefile: config.status GNUmakefile.in
$(SHELL) ./config.status $(SHELL) ./config.status
ifneq "$(CHECK_CONFIG)" ""
config.status: configure config.status: configure
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
...@@ -55,8 +55,13 @@ endif ...@@ -55,8 +55,13 @@ endif
# main build variables # main build variables
CXXFLAGS += -Wall -Wno-multichar CXXFLAGS += -Wall -Wno-multichar
DATADIR = $(datadir)/dssp CIFPP_RSRC = @CIFPP_RSRC@
ifneq "$(CIFPP_RSRC)" ""
DATADIR = $(CIFPP_RSRC)
else
DATADIR = $(datadir)/libcifpp
endif
DEFINES += DATADIR='"$(DATADIR)"' 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
...@@ -110,6 +115,7 @@ src/revision.hpp: $(REVISION_FILE) ...@@ -110,6 +115,7 @@ src/revision.hpp: $(REVISION_FILE)
$(OBJDIR)/pr-main.o: src/revision.hpp $(OBJDIR)/pr-main.o: src/revision.hpp
ifneq "$(USE_RSRC)" "0" ifneq "$(USE_RSRC)" "0"
COMMON_RSRC = $(DATADIR)/dictionaries
rsrc: rsrc:
@ mkdir -p $@ @ mkdir -p $@
...@@ -124,8 +130,6 @@ endif ...@@ -124,8 +130,6 @@ endif
# disabled for now: centrifuge map-maker # disabled for now: centrifuge map-maker
PROGRAMS = dssp PROGRAMS = dssp
dssp_RSRC = rsrc/
define PROGRAM_template = define PROGRAM_template =
$(1)_OBJECTS += $(1).o $(COMMON_OBJECTS) $(1)_OBJECTS += $(1).o $(COMMON_OBJECTS)
...@@ -133,7 +137,7 @@ $(1)_OBJECTS += $(1).o $(COMMON_OBJECTS) ...@@ -133,7 +137,7 @@ $(1)_OBJECTS += $(1).o $(COMMON_OBJECTS)
ifneq "$(USE_RSRC)" "0" ifneq "$(USE_RSRC)" "0"
$(1)_OBJECTS += $(1).o $(1)_rsrc.o $(1)_OBJECTS += $(1).o $(1)_rsrc.o
$$(OBJDIR)/$(1)_rsrc.o: $$($(1)_RSRC) $$(OBJDIR)/$(1)_rsrc.o: $$($(1)_RSRC) $$(COMMON_RSRC)
$(MRC) -o $$@ $$^ $(MRC) -o $$@ $$^
endif endif
...@@ -163,10 +167,6 @@ all: $(PROGRAMS) ...@@ -163,10 +167,6 @@ all: $(PROGRAMS)
install: $(PROGRAMS) install: $(PROGRAMS)
install -d $(bindir) install -d $(bindir)
for p in $(PROGRAMS); do install $$p $(bindir)/$$p; done for p in $(PROGRAMS); do install $$p $(bindir)/$$p; done
ifeq "$(USE_RSRC)" "0"
install -d $(DATADIR)/dictionaries
install -m644 rsrc/mmcif_pdbx.dic $(DATADIR)/dictionaries/mmcif_pdbx.dic
endif
.PHONY: FORCE .PHONY: FORCE
FORCE: FORCE:
......
...@@ -86,11 +86,14 @@ AC_ARG_WITH([cif++], ...@@ -86,11 +86,14 @@ AC_ARG_WITH([cif++],
CIFPP_CFLAGS="-I ${withval}/include" CIFPP_CFLAGS="-I ${withval}/include"
CIFPP_LIBS="-L${withval}/.libs -lcif++" CIFPP_LIBS="-L${withval}/.libs -lcif++"
CIFPP_RSRC="${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"], [
AC_PATH_PROG([PKG_CONFIG], [pkg-config]) AC_PATH_PROG([PKG_CONFIG], [pkg-config])
if test -x "$PKG_CONFIG" if test -x "$PKG_CONFIG"
...@@ -108,8 +111,10 @@ is installed, and either use the --with-cif++ option or install ...@@ -108,8 +111,10 @@ is installed, and either use the --with-cif++ option or install
pkg-config.])]) pkg-config.])])
AX_CHECK_LIBRARY([CIFPP], [cif++/Config.hpp], [cif++], AX_CHECK_LIBRARY([CIFPP], [cif++/Config.hpp], [cif++],
[ LIBS="-lcif++ $LIBS" ], [
[AC_MSG_ERROR([libcif++ not found])]) LIBS="-lcif++ $LIBS"
],
fi fi
]) ])
......
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