Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Build system (Linux) updates
[xestiaab/.git] / source / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ([2.68])
5 AC_INIT([Xestia Address Book], [0.01], [bugs@xestia.co.uk])
6 #AC_CONFIG_SRCDIR([version.h])
7 #AC_CONFIG_HEADERS([config.h])
9 AC_DEFINE([DEBUG], [1], [Enable debugging build so errors can be examined in detail.])
11 # Checks for programs.
12 AC_PROG_CXX
13 AC_PROG_CC
14 AC_PROG_CPP
16 # Checks for libraries.
18 # wxWidgets
20 AC_LANG_PUSH([C++])
22 # Check for C++11 support for the compiler.
24 CPPFLAGS="$CPPFLAGS -std=c++11"
25 CXXFLAGS="$CXXFLAGS -std=c++11"
27 AC_CHECK_HEADER([thread], [], [echo "The C++ compiler does not support C++11 extensions which is
28 needed for Xestia Address Book. Please install or use a 
29 compiler that supports C++11 extensions."
30         exit -1
31         ])
33 AM_OPTIONS_WXCONFIG
34 reqwx=3.0.0
35 AM_PATH_WXCONFIG($reqwx, wxWin=1)
36 if test "$wxWin" != 1; then
37         AC_MSG_ERROR([
38 wxWidgets must be installed on your system.
39  
40 Please check that wx-config is in path, the directory where wxWidgets libraries 
41 are installed (returned by 'wx-config --libs' or 'wx-config --static --libs' 
42 command) is in LD_LIBRARY_PATH or equivalent variable and wxWidgets version 
43 is $reqwx or above.
44                 ])
45 fi
47 CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
48 CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
49 CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
50 LIBS="$LIBS $WX_LIBS"
52 # SFML Audio Library
54 AC_CHECK_LIB([sfml-audio], [main], [], [echo "The SFML libraries must be installed on your system.
55 Please check that this library is installed properly before
56 running configure again."
57         exit -1
58         ])
60 AC_CHECK_HEADER([SFML/Audio.hpp], [], [echo "The SFML library headers must be installed on your system.
61 Please check that the library headers are installed properly
62 before running configure again."
63         exit -1
64         ])
66 # ossp-uuid Library
68 AC_CHECK_LIB([ossp-uuid++], [main], [], [echo "The OSSP UUID C++ library must be installed on your system.
69 Please check that this library is installed properly before
70 running configure again."
71         exit -1
72         ])
74 AC_CHECK_HEADER([ossp/uuid++.hh], [], [echo "The OSSP UUID C++ library headers must be installed on your system.
75 Please check that the library headers are installed properly
76 before running configure again."
77         exit -1
78         ])
80 AC_LANG_PUSH([C++])
82 # curl Library
84 AC_CHECK_LIB([curl], [main], [], [echo "The cURL library must be installed on your system.
85 Please check that this library is installed properly before
86 running configure again."
87         exit -1
88         ])
90 AC_CHECK_HEADER([curl/curl.h], [], [echo "The cURL library headers must be installed on your system.
91 Please check that the library headers are installed properly
92 before running configure again."
93         exit -1
94         ])
96 # libxml2 Library
98 AC_CHECK_LIB([xml2], [main], [], [echo "The libxml2 library must be installed on your system.
99 Please check that this library is installed properly before
100 running configure again."
101         exit -1
102         ])
104 AC_CHECK_HEADERS([libxml2/libxml/parser.h libxml2/libxml/tree.h], [], [echo "The libxml2 library headers must be installed on your system.
105 Please check that the library headers are installed properly
106 before running configure again."
107         exit -1
108         ])
110 # Checks for header files.
111 AC_CHECK_HEADERS([stdlib.h string.h iostream iomanip ios algorithm map vector utility])
113 # Checks for typedefs, structures, and compiler characteristics.
114 AC_HEADER_STDBOOL
115 AC_C_INLINE
117 # Setup the debug setting.
119 AC_ARG_ENABLE([debug],
120 [  --enable-debug          Enable a debugging build],
121 [case "${enableval}" in
122         yes) debug=true;;
123         no)  debug=false;;
124         *) AC_MSG_ERROR([invalid value ${enableval} given for --enable-debug]) ;;
125  esac],[debug=false])
127 # Checks for library functions.
129 AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
130 AM_COND_IF([DEBUG], [AC_SUBST([DBGOUT], ["-O0"])], [AC_SUBST([DBGOUT], ["-Os"])])
131 AM_COND_IF([DEBUG], [AC_SUBST([DBGSTATUS], ["DEBUG=true"])], [AC_SUBST([DBGSTATUS], ["DEBUG=false"])])
132 AM_COND_IF([DEBUG], [echo "Debugging mode has been enabled."])
134 AC_CONFIG_FILES([Makefile])
135 AC_OUTPUT
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy