~holger-seelig/titania/4.0

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
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(fixed-pipeline-drivers,
	AC_HELP_STRING([--enable-fixed-pipeline-drivers],
		[Enable Nouveau for 'Cobweb Compatibility Mode' [default=NO]]),
		enable_fixed_pipeline_drivers=yes, enable_fixed_pipeline_drivers=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="-Wall -std=c++14 -O3 -fopenmp -Wno-narrowing -Wno-deprecated -DFIXED_PIPELINE"

### 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_fixed_pipeline_drivers" = "xyes" ; then
	CXXFLAGS=$CXXFLAGS" -DTITANIA_FIXED_PIPELINE_DRIVERS"
fi

LDFLAGS="-rdynamic"



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++11 compiler support
dnl ***************************************************************************

if test x$ax_cxx_compile_cxx11_required = xtrue; then
	if test x$ac_success = xno; then
		AC_MSG_ERROR([*** A compiler with support for C++11 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 test "$USE_GLX" = "no"; then
	AC_MSG_ERROR([*** Please install X11 backend.])
fi



dnl ***************************************************************************
dnl Check required libraries that do not have a pkgconfig
dnl ***************************************************************************

AC_CHECK_LIB(CGAL, _init) 



dnl ***************************************************************************
dnl Check required libraries
dnl ***************************************************************************

PKG_CHECK_MODULES(TITANIA,
gtksourceviewmm-3.0)

PKG_CHECK_MODULES(TITANIA_X3D,
gtkmm-3.0
gl
glibmm-2.4
gstreamermm-1.0
fontconfig
glu
glew
mozjs185
libxml++-2.6
json-c
ImageMagick++
libgtop-2.0)

PKG_CHECK_MODULES(TITANIA_FTGL,
freetype2
fontconfig
gl
glu)

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
gl
glu
zlib)


AC_OUTPUT([
libtitania-standard/Makefile
libtitania-sqlite/Makefile
libtitania-stream/Makefile
libtitania-peaseblossom/Makefile
libtitania-ftgl/Makefile
libtitania-x3d/Makefile
Titania/Makefile
experimental/Makefile
po/Makefile.in
Makefile
])