-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathconfigure.ac
More file actions
191 lines (137 loc) · 4.77 KB
/
Copy pathconfigure.ac
File metadata and controls
191 lines (137 loc) · 4.77 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
dnl Process this file with autoconf to produce a configure script.
dnl Created by Anjuta application wizard.
AC_INIT(titania, 0.1)
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([subdir-objects])
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE
AC_PROG_INSTALL
AC_PROG_CXX
dnl ***************************************************************************
dnl Configurations
dnl ***************************************************************************
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],
[Use 'DEBUG' Configuration [default=NO]]),
enable_debug=yes, enable_debug=no)
AC_ARG_ENABLE(feature,
AC_HELP_STRING([--enable-feature],
[Enable experimental features [default=NO]]),
enable_feature=yes, enable_feature=no)
AC_ARG_ENABLE(flatpak_spawn,
AC_HELP_STRING([--enable-flatpak-spawn],
[Enable flatpak spawn [default=NO]]),
enable_flatpak_spawn=yes, enable_flatpak_spawn=no)
dnl ***************************************************************************
dnl Compile options
dnl ***************************************************************************
dnl ******* add "-flto --plugin=$(gcc --print-file-name=liblto_plugin.so)" flags (link time optimization) to CXXFLAGS or LDFLAGS if it is working
dnl ******* CXXFLAGS=$CXXFLAGS" -DTITANIA_DEBUG -Wno-deprecated-declarations"
CXXFLAGS="-std=c++17 -O3 -Wall -Wno-narrowing -Wno-deprecated -Wno-unused-result"
### add GTKMM_DISABLE_DEPRECATED
if test "x$enable_debug" = "xyes" ; then
CXXFLAGS=$CXXFLAGS" -DTITANIA_DEBUG"
fi
if test "x$enable_feature" = "xyes" ; then
CXXFLAGS=$CXXFLAGS" -DTITANIA_FEATURE"
fi
if test "x$enable_flatpak_spawn" = "xyes" ; then
CXXFLAGS=$CXXFLAGS" -DTITANIA_FLATPAK_SPAWN"
fi
LDFLAGS="-rdynamic"
if uname -s | grep -q "Darwin"; then
export PKG_CONFIG_PATH="/opt/X11/lib/pkgconfig:"`pwd`/brew/mozjs/lib/pkgconfig:`pwd`/brew/gstreamermm/lib/pkgconfig
CXXFLAGS=$CXXFLAGS" -static"
CXXFLAGS=$CXXFLAGS" -I/usr/local/include"
CXXFLAGS=$CXXFLAGS" -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES -DGL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED"
LDFLAGS=$LDFLAGS" -L/usr/local/lib -lomp -framework OpenGL"
else
CXXFLAGS=$CXXFLAGS" -latomic -fopenmp"
fi
dnl ***************************************************************************
dnl Internationalization
dnl ***************************************************************************
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=titania
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
AM_GLIB_GNU_GETTEXT
LT_INIT
dnl ***************************************************************************
dnl Check for C++17 compiler support
dnl ***************************************************************************
if test x$ax_cxx_compile_cxx17_required = xtrue; then
if test x$ac_success = xno; then
AC_MSG_ERROR([*** A compiler with support for C++17 language features is required.])
fi
fi
dnl ***************************************************************************
dnl Check for GLX
dnl ***************************************************************************
USE_GLX="no"
PKG_CHECK_MODULES([GLX], [gl x11], [USE_GLX="yes"], [:])
AC_CHECK_HEADERS([GL/gl.h GL/glx.h], [:], [USE_GLX="no"])
AC_CHECK_LIB([GL], [glXCreateContext], [:] [USE_GLX="no"])
AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes")
if ! uname -s | grep -q "Darwin"; then
if test "$USE_GLX" = "no"; then
AC_MSG_ERROR([*** Please install X11 backend.])
fi
fi
dnl ***************************************************************************
dnl Check required libraries that do not have a pkgconfig
dnl ***************************************************************************
# Does not work with FlatPak
#USE_CGAL="no"
#AC_CHECK_LIB(CGAL, _init, [USE_CGAL="yes"])
#if test "$USE_CGAL" = "no"; then
# AC_MSG_ERROR([*** Please install CGAL library.])
#fi
dnl ***************************************************************************
dnl Check required libraries
dnl ***************************************************************************
PKG_CHECK_MODULES(TITANIA,
gtkmm-3.0
gtksourceviewmm-3.0)
PKG_CHECK_MODULES(TITANIA_X3D,
gtkmm-3.0
glibmm-2.4
gstreamermm-1.0
fontconfig
mozjs-68
libxml++-2.6
json-c
libgtop-2.0
bullet
x11)
if ! uname -s | grep -q "Darwin"; then
PKG_CHECK_MODULES(TITANIA_GL,
gl
glu
glew)
fi
PKG_CHECK_MODULES(TITANIA_FTGL,
freetype2
fontconfig)
PKG_CHECK_MODULES(TITANIA_STREAM,
libcurl
giomm-2.4)
PKG_CHECK_MODULES(TITANIA_SQLITE,
sqlite3)
PKG_CHECK_MODULES(TITANIA_STANDARD,
giomm-2.4
glibmm-2.4
zlib)
PKG_CHECK_MODULES(TITANIA_EXPERIMENTAL,
gtkmm-3.0)
AC_OUTPUT([
libtitania-standard/Makefile
libtitania-sqlite/Makefile
libtitania-stream/Makefile
libtitania-ftgl/Makefile
libtitania-x3d/Makefile
Titania/Makefile
experimental/Makefile
po/Makefile.in
Makefile
])