forked from mkoloberdin/pasmo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
99 lines (57 loc) · 2.03 KB
/
Copy pathconfigure.ac
File metadata and controls
99 lines (57 loc) · 2.03 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# configure.ac for Pasmo
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT(pasmo, 0.6.0.20070113.0, julian.notfound@gmail.com)
AC_CONFIG_HEADERS([config.h config_debug.h config_version.h config_types.h config_ostream.h])
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_PROG_YACC
if test "$YACC" != "bison -y"
then
AC_MSG_ERROR([bison required])
fi
# Set C++ as default language:
AC_LANG_PUSH([C++])
if test "$enable_debug" = "yes" ; then
# Check for macros __FUNCTION__ and __PRETTY_FUNCTION__
# for use in trace debugging system.
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
# Check for header files
AC_CHECK_HEADERS([stdint.h])
AC_CHECK_HEADERS([ostream])
# End C++ checks
AC_LANG_POP
# Generate files
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
# End of configure.ac for Pasmo