-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure.ac
73 lines (46 loc) · 1.73 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# configure.ac for Pasmo
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT(pasmo, 0.5.4.beta2, julian.notfound@gmail.com)
AM_INIT_AUTOMAKE
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
########################################################################
# Options
########################################################################
AC_ARG_ENABLE(debug, AC_HELP_STRING(
[--enable-debug], [Debug version [[no]]] ) )
if test "$enable_debug" = "yes" ; then
AC_MSG_RESULT([Configured for debug version])
else
AC_MSG_RESULT([Configured for release version])
AC_DEFINE([NDEBUG], [], [Using debug mode])
fi
########################################################################
# Check for programs.
AC_PROG_CXX
AC_LANG_PUSH([C++])
# Check for macros __FUNCTION__ and __PRETTY_FUNCTION__
# for use in trace debugging system.
if test "$enable_debug" = "yes" ; then
AC_MSG_CHECKING(wheter the C++ compiler(${CXX}) supports __FUNCTION__)
AC_TRY_LINK([#include <stdio.h>],[puts(__FUNCTION__);],
have_function=yes,have_function=no)
AC_MSG_RESULT($have_function)
if test "$have_function" = "yes" ; then
AC_DEFINE(HAVE_FUNCTION, [1], [Compiler has __FUNCTION__])
AC_MSG_CHECKING(wheter the C++ compiler(${CXX}) supports __PRETTY_FUNCTION__)
AC_TRY_LINK([#include <stdio.h>],[puts(__PRETTY_FUNCTION__);],
have_pretty_function=yes,have_pretty_function=no)
AC_MSG_RESULT($have_pretty_function)
if test "$have_pretty_function" = "yes" ; then
AC_DEFINE(HAVE_PRETTY_FUNCTION, [1], [Compiler has __PRETTY_FUNCTION__])
fi
fi
fi
AC_LANG_POP
########################################################################
# Generate files
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
# End of configure.ac for Pasmo