Skip to content

Commit

Permalink
Improve project configuration.
Browse files Browse the repository at this point in the history
* configure.ac: Add option disable-documentation and define HAVE_TCL_H
  if tcl8.5/.tcl.h is found.
* include/Makefile.am: Compile qdft_wrap.cxx iff. HAVE_TCL_H is defined.
  • Loading branch information
joudinet committed Jan 9, 2014
1 parent d8d7165 commit 7e1d77b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 21 deletions.
18 changes: 13 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@ LT_INIT([disable-static])
AC_PROG_CXX

# Documentation
AC_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN";
then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
fi
AC_ARG_ENABLE([documentation],
[AS_HELP_STRING([--disable-documentation],
[Do not build documentation])])
AS_IF([test "x$enable_documentation" != xno],
[AC_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN"; then
AC_MSG_WARN(
[Doxygen not found - continuing without Doxygen support])
fi
])

# Attempt to use strict language conformance checking.
AC_CXX_FLAGS
Expand All @@ -44,7 +50,9 @@ BOOST_REQUIRE([1.47.0])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

AC_CHECK_HEADER([tcl8.5/tcl.h], [], [AC_MSG_ERROR([tcl8.5-dev not found])])
dnl AC_CHECK_HEADER([tcl8.5/tcl.h], [], [AC_MSG_ERROR([tcl8.5-dev not found])])
AC_CHECK_HEADERS_ONCE([tcl8.5/tcl.h])
AM_CONDITIONAL([HAVE_TCL_H], [test "${ac_cv_header_tcl8_5_tcl_h}" = yes])

AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])])
Expand Down
35 changes: 19 additions & 16 deletions include/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2011, 2012 Johan Oudinet <[email protected]>
# Copyright (C) 2011, 2012, 2014 Johan Oudinet <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -19,22 +19,25 @@ AM_CPPFLAGS = -I$(srcdir)/../include $(BOOST_CPPFLAGS)

lib_LTLIBRARIES = libqdftgraph.la

libqdftgraph_la_SOURCES = \
qdft/action.hh \
qdft/graph.hh \
qdft/manager.hh \
qdft/manager.hxx \
qdft/qdft.hh \
qdft/qdft.hxx \
qdft/types.hh \
qdft/qdft_wrap.cxx
libqdftgraph_la_SOURCES = \
qdft/action.hh \
qdft/graph.hh \
qdft/manager.hh \
qdft/manager.hxx \
qdft/qdft.hh \
qdft/qdft.hxx \
qdft/types.hh

if HAVE_TCL_H
libqdftgraph_la_SOURCES += qdft/qdft_wrap.cxx
endif

libqdftgraph_la_LDFLAGS = -no-undefined

nobase_include_HEADERS = \
qdft/qdft.i \
qdft/libqdftgraph.cs \
qdft/libqdftgraphPINVOKE.cs \
qdft/dataManagers.cs \
qdft/mode_type.cs \
nobase_include_HEADERS = \
qdft/qdft.i \
qdft/libqdftgraph.cs \
qdft/libqdftgraphPINVOKE.cs \
qdft/dataManagers.cs \
qdft/mode_type.cs \
qdft/SWIGTYPE_p_std__ostream.cs

0 comments on commit 7e1d77b

Please sign in to comment.