diff options
author | deva <deva> | 2007-08-22 10:25:43 +0000 |
---|---|---|
committer | deva <deva> | 2007-08-22 10:25:43 +0000 |
commit | 9591262f6204c31f622f57be28b3d727470e2fce (patch) | |
tree | 44d30e067bfa1ff7af21b080e8294aa76f578a09 /server/configure.in | |
parent | 47750e70ba9171c10e32a1033b68ae2b614799fa (diff) |
Dummy server created.
Diffstat (limited to 'server/configure.in')
-rw-r--r-- | server/configure.in | 164 |
1 files changed, 164 insertions, 0 deletions
diff --git a/server/configure.in b/server/configure.in new file mode 100644 index 0000000..339d266 --- /dev/null +++ b/server/configure.in @@ -0,0 +1,164 @@ +# Filename: configure.in + +AC_INIT(src/pracrod.cc) +AM_INIT_AUTOMAKE( pracrod, 0.0.1 ) + +AC_PROG_CXX + +AC_PROG_LIBTOOL +AM_PROG_LIBTOOL + +AM_CONFIG_HEADER(config.h) +AC_STDC_HEADERS + +dnl ====================== +dnl Create the ETC var i config.h +dnl ====================== +if echo "$prefix" | grep "NONE" > /dev/null +then + MYPREFIX="/usr/local" +else + MYPREFIX="${prefix}" +fi +AC_SUBST(MYPREFIX) +AC_DEFINE_UNQUOTED(ETC, "$MYPREFIX/etc", [The path to the config files]) + + +dnl ====================== +dnl Use efence in linking and includes +dnl ====================== +AC_ARG_ENABLE(efence, + [ --enable-efence enable efence - for debugging only (no)], + [], [ enable_efence=no]) +if test "x$enable_efence" = xno; then + enable_efence=no +else + LD_EFENCE="-lefence" + AC_SUBST(LD_EFENCE) + AC_DEFINE_UNQUOTED(USE_EFENCE, , [Use the efence includes]) +fi + + +dnl ====================== +dnl Create the XML var i config.h +dnl ====================== +AC_DEFINE_UNQUOTED(XML, "$MYPREFIX/share/xml", [The path to the xml files]) + + +dnl ====================== +dnl Check for getopt +dnl ====================== +AC_HAVE_HEADERS(getopt.h) + + +dnl ====================== +dnl Check for libpqxx +dnl ====================== +PKG_CHECK_MODULES(PQXX, libpqxx >= 0.20) + + +dnl ====================== +dnl Check for libconfig++ +dnl ====================== +PKG_CHECK_MODULES(CONFIG, libconfig++ >= 1.0.1) + + +dnl ====================== +dnl Check for xerces-x +dnl ====================== +AC_ARG_WITH(xercescinc, + [ --with-xercescinc Set the incude dir for xerces], + [if test -n ${with_xercescinc}; then + xercesc_inc=${with_xercescinc}; + dcheck="$dcheck --with-xercescinc=${with_xercescinc} "; + else + xercesc_inc=${oldincludedir}/xercesc; + fi + ], + [xercesc_inc=${oldincludedir}/xercesc;] +) +AC_ARG_WITH(xercesclib, + [ --with-xercesclib Set the lib dir for xerces], + [if test -n ${with_xercesclib}; then + xercesc_lib=${with_xercesclib}; + dcheck="$dcheck --with-xercesclib=${with_xercesclib} " + else + xercesc_lib=${libdir}; + fi + ], + [xercesc_lib=${libdir};] +) +CXXFLAGS="${CXXFLAGS} -I${xercesc_inc}" +LIBS="${LIBS} -L${xercesc_lib} -lxerces-c" +AC_SUBST(CXXFLAGS) +AC_SUBST(LIBS) +AC_CHECK_HEADER(xercesc/util/XercesVersion.hpp, , + AC_MSG_ERROR([*** libxerces-c headers not found!])) +AC_CHECK_LIB(xerces-c, main, , AC_MSG_ERROR([*** libxerces-c not found!])) + +AC_SUBST(CFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(CXXFLAGS) +AC_SUBST(LDFLAGS) + + + + +# check for doxygen, mostly stolen from http://log4cpp.sourceforge.net/ +# ---------------------------------------------------------------------------- +AC_DEFUN([BB_ENABLE_DOXYGEN], +[ +AC_ARG_ENABLE(doxygen, + [ --enable-doxygen enable documentation generation with doxygen (auto)]) +AC_ARG_ENABLE(dot, + [ --enable-dot use 'dot' to generate graphs in doxygen (auto)]) +AC_ARG_ENABLE(html-docs, + [ --enable-html-docs enable HTML generation with doxygen (no)], + [], [ enable_html_docs=no]) +AC_ARG_ENABLE(latex-docs, + [ --enable-latex-docs enable LaTeX documentation generation with doxygen (no)], + [], [ enable_latex_docs=no]) +if test "x$enable_doxygen" = xno; then + enable_doc=no +else + AC_OUTPUT(doc/Makefile) + DOC_DIR=doc + AC_SUBST(DOC_DIR) + AC_PATH_PROG(DOXYGEN, doxygen, , $PATH) + if test x$DOXYGEN = x; then + if test "x$enable_doxygen" = xyes; then + AC_MSG_ERROR([could not find doxygen]) + fi + enable_doc=no + else + enable_doc=yes + AC_PATH_PROG(DOT, dot, , $PATH) + fi +fi +AM_CONDITIONAL(DOC, test x$enable_doc = xyes) + +if test x$DOT = x; then + if test "x$enable_dot" = xyes; then + AC_MSG_ERROR([could not find dot]) + fi + enable_dot=no +else + enable_dot=yes +fi +AM_CONDITIONAL(ENABLE_DOXYGEN, test x$enable_doc = xtrue) +AC_SUBST(enable_dot) +AC_SUBST(enable_html_docs) +AC_SUBST(enable_latex_docs) +]) + +# check for doxygen +# ---------------------------------------------------------------------------- +BB_ENABLE_DOXYGEN + +AC_OUTPUT( + Makefile + src/Makefile + etc/Makefile + man/Makefile + xml/Makefile) + |