X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fconfigure.ac;h=76b79ab99c9c8d9b600cc01580e14b3ad6c1d3cb;hb=ad56006947ba861bd4becb66a034cc3f476882d9;hp=42cff2db88db20be0ddbdea5ec9c7704a21428f4;hpb=b90f5ba691f1ddbe377101b79f31c9a85a0235d2;p=xestiaab%2F.git diff --git a/source/configure.ac b/source/configure.ac index 42cff2d..76b79ab 100644 --- a/source/configure.ac +++ b/source/configure.ac @@ -2,15 +2,36 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.68]) -AC_INIT([Xestia Address Book], [0.01], [bugs@xestia.co.uk]) +AC_INIT([Xestia Address Book], [0.03], [bugs@xestia.co.uk]) #AC_CONFIG_SRCDIR([version.h]) #AC_CONFIG_HEADERS([config.h]) +AC_DEFINE([DEBUG], [1], [Enable debugging build so errors can be examined in detail.]) + # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_CPP +# Check prefix directories. + +if test "x$prefix" = "xNONE" ; then + prefix="/usr/local" +fi + +if test "x$exec_prefix" = "xNONE" ; then + exec_prefix=$prefix +fi + +PREFIX=$prefix +AC_SUBST([PREFIX]) + +if test "x$bindir" = "xNONE" ; then + bindir="/bin" +fi +BINDIR=`eval echo $bindir` +AC_SUBST([BINDIR]) + # Checks for libraries. # wxWidgets @@ -61,20 +82,6 @@ before running configure again." exit -1 ]) -# ossp-uuid Library - -AC_CHECK_LIB([ossp-uuid++], [main], [], [echo "The OSSP UUID C++ library must be installed on your system. -Please check that this library is installed properly before -running configure again." - exit -1 - ]) - -AC_CHECK_HEADER([ossp/uuid++.hh], [], [echo "The OSSP UUID C++ library headers must be installed on your system. -Please check that the library headers are installed properly -before running configure again." - exit -1 - ]) - AC_LANG_PUSH([C++]) # curl Library @@ -91,8 +98,29 @@ before running configure again." exit -1 ]) +AC_CHECK_PROG([FOUND_CURLCONFIG], [curl-config], [yes], [no]) +AM_CONDITIONAL([FOUND_CURLCONFIG_RES], [test x$FOUND_CURLCONFIG = xyes]) + +AM_COND_IF([FOUND_CURLCONFIG_RES], [], [echo "Cannot find the curl-config program on your system. +If it is installed on your system, adjust your PATH environment +variable before running configure again." + exit -1 + ]) + # libxml2 Library +CPPFLAGSOLD=CPPFLAGS +CPPFLAGS=`xml2-config --cflags` + +AC_CHECK_PROG([FOUND_XML2CONFIG], [xml2-config], [yes], [no]) +AM_CONDITIONAL([FOUND_XML2CONFIG_RES], [test x$FOUND_XML2CONFIG = xyes]) + +AM_COND_IF([FOUND_XML2CONFIG_RES], [], [echo "Cannot find the xml2-config program on your system. +If it is installed on your system, adjust your PATH environment +variable before running configure again." + exit -1 + ]) + AC_CHECK_LIB([xml2], [main], [], [echo "The libxml2 library must be installed on your system. Please check that this library is installed properly before running configure again." @@ -105,6 +133,30 @@ before running configure again." exit -1 ]) +CPPFLAGS=CPPFLAGSOLD + +# file application + +AC_CHECK_PROG([FOUND_FILE], [file], [yes], [no]) +AM_CONDITIONAL([FOUND_FILE_RES], [test x$FOUND_FILE = xyes]) + +AM_COND_IF([FOUND_FILE_RES], [], [echo "Cannot find the file program on your system. +If it is installed on your system, adjust your PATH environment +variable before running configure again." + exit -1 + ]) + +# uuidgen application + +AC_CHECK_PROG([FOUND_UUIDGEN], [uuidgen], [yes], [no]) +AM_CONDITIONAL([FOUND_UUIDGEN_RES], [test x$FOUND_UUIDGEN = xyes]) + +AM_COND_IF([FOUND_UUIDGEN_RES], [], [echo "Cannot find the uuidgen program on your system. +If it is installed on your system, adjust your PATH environment +variable before running configure again." + exit -1 + ]) + # Checks for header files. AC_CHECK_HEADERS([stdlib.h string.h iostream iomanip ios algorithm map vector utility]) @@ -112,7 +164,22 @@ AC_CHECK_HEADERS([stdlib.h string.h iostream iomanip ios algorithm map vector ut AC_HEADER_STDBOOL AC_C_INLINE +# Setup the debug setting. + +AC_ARG_ENABLE([debug], +[ --enable-debug Enable debugging features for the build.], +[case "${enableval}" in + yes) debug=true;; + no) debug=false;; + *) AC_MSG_ERROR([invalid value ${enableval} given for --enable-debug]) ;; + esac],[debug=false]) + # Checks for library functions. +AM_CONDITIONAL([DEBUG], [test x$debug = xtrue]) +AM_COND_IF([DEBUG], [AC_SUBST([DBGOUT], ["-O0 -ggdb"])], [AC_SUBST([DBGOUT], ["-Os"])]) +AM_COND_IF([DEBUG], [AC_SUBST([DBGSTATUS], ["DEBUG=true"])], [AC_SUBST([DBGSTATUS], ["DEBUG=false"])]) +AM_COND_IF([DEBUG], [echo "Debugging mode has been enabled."]) + AC_CONFIG_FILES([Makefile]) AC_OUTPUT