-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.in
117 lines (101 loc) · 3.32 KB
/
configure.in
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Public domain
# ex:syn=bsdbuild
#
# Edacious configure script source.
#
# This is a BSDBuild configure source. The configure script is generated by the
# mkconfigure(1) utility of BSDBuild (http://bsdbuild.hypertriton.com/).
#
package("Edacious")
version("1.0")
release("Sepulchral and Frog Like")
register_section("Options specific to Edacious:")
register("--enable-debug", "General debugging [default: no]")
register("--enable-fpdebug", "Debug FP exceptions [default: no]")
register("--enable-exprdebug", "Debug expression parsing [default: no]")
register("--enable-warnings", "Enable compiler warnings [default: no]")
register("--enable-edition", "Enable graphical editor [default: yes]")
register("--with-agar[=PREFIX]", "Specify Agar location [default: auto]")
hdefine(EDACIOUS_VERSION, "$VERSION")
default_dir(DATADIR, "${PREFIX}/share/edacious")
default_dir(MODULEDIR, "${LIBDIR}/edacious")
default_dir(INCLDIR, "${PREFIX}/include/edacious")
echo ' __ ------------------------------ '
echo ' / __|--+-+----+---+----+----+---+--| '
echo ' ___|_| | |_| |_ |_ |_ |_ |_ | ___ '
echo ' |---| \\ | / _ \ / _| | | / _ \ | | | ||| '
echo ' |===| |||| |_| || |_ | || |_| || |_| || === '
echo ' |___|_// ||_| |_| \ _| |_| \ _ / \___/ |____|'
echo ' \ \ \_| | | | | | | | '
echo ' \__|__|-+---+----+---+----+------+---| '
echo ' ------------------------------ '
require(cc)
check(sys_types)
check(getopt)
check(getpwuid)
check(getuid)
# Require Agar with VG, DEV and MATH extensions.
require(agar, 1.6.0, ${prefix_agar})
require(agar-vg, 1.6.0, ${prefix_agar})
require(agar-dev, 1.6.0, ${prefix_agar})
require(agar-math, 1.6.0, ${prefix_agar})
# Import standard routines provided by Agar (without "AG"_ prefix).
c_define(_USE_AGAR_STD)
c_define(_USE_AGAR_CORE)
c_define(_USE_AGAR_QUEUE)
c_define(_USE_AGAR_GUI)
c_define(_USE_AGAR_TYPES)
# Import standard math functions (e.g., Sin()) provided by the
# Agar-MATH library (without the "M_" prefix).
c_define(_USE_AGAR_MATH)
# Don't unwind nullability specifiers.
c_define(_USE_AGAR_NULLABILITY)
# C compiler options
c_define(_ES_INTERNAL)
c_define(_DEFAULT_SOURCE)
c_define(_BSD_SOURCE)
c_no_secure_warnings()
if [ "${enable_warnings}" != "no" ]; then
c_option(-Wall)
c_option(-Werror)
c_option(-Wmissing-prototypes)
fi
if [ "${enable_debug}" = "yes" ]; then
c_define(ES_DEBUG)
hdefine(ES_DEBUG, "yes")
mdefine(CFLAGS, "${CFLAGS} -g")
else
hundef(ES_DEBUG)
fi
if [ "${enable_fpdebug}" = "yes" ]; then
c_define(FP_DEBUG)
hdefine(FP_DEBUG, "yes")
else
hundef(FP_DEBUG)
fi
if [ "${enable_exprdebug}" = "yes" ]; then
c_define(EXPR_DEBUG)
hdefine(EXPR_DEBUG, "yes")
else
hundef(EXPR_DEBUG)
fi
# Enable NLS if requested explicitely.
if [ "${enable_nls}" = "yes" ]; then
check(gettext, 0, ${prefix_gettext})
if [ "${HAVE_GETTEXT}" != "yes" ]; then
echo "*"
echo "* --enable-nls was given but gettext was not found."
echo "*"
exit 1
fi
else
hundef(HAVE_GETTEXT, GETTEXT_CFLAGS, GETTEXT_LIBS)
fi
# Set up configure script output.
c_incprep($BLD/include/edacious)
c_incdir($BLD/include)
c_incdir($BLD/include/edacious)
c_incdir_config($BLD/include/edacious/config)
# Generate the "edacious-config" script.
config_script(edacious-config, "-I${INCLDIR} ${GETTEXT_CFLAGS}", \
"-L${LIBDIR} -les_core ${GETTEXT_LIBS}")