forked from GNOME/gtkmm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
172 lines (147 loc) · 7.18 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
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
## Copyright (c) 2009-2014 Openismus GmbH <http://www.openismus.com/>
##
## This file is part of gtkmm.
##
## gtkmm is free software: you can redistribute it and/or modify it
## under the terms of the GNU Lesser General Public License as published
## by the Free Software Foundation, either version 2.1 of the License,
## or (at your option) any later version.
##
## gtkmm is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
## See the GNU Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with this library. If not, see <http://www.gnu.org/licenses/>.
AC_INIT([gtkmm], [3.93.0],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtkmm],
[gtkmm], [http://www.gtkmm.org/])
AC_PREREQ([2.59])
AC_CONFIG_SRCDIR([gtk/gtkmm.h])
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_MACRO_DIR([build])
AC_CONFIG_HEADERS([config.h gdk/gdkmmconfig.h gtk/gtkmmconfig.h])
AM_INIT_AUTOMAKE([1.9 -Wno-portability check-news no-dist-gzip dist-xz tar-ustar no-define nostdinc])
# Support silent build rules.
# Disable by either passing --disable-silent-rules to configure or passing V=1 to make.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
MM_PREREQ([0.9.10])
MM_INIT_MODULE([gdkmm-4.0])
MM_INIT_MODULE([gtkmm-4.0])
# Copy the mm-common .pl scripts into docs/,
# and use them from there,
# so we can dist them to avoid a tarball-build dependency.
MM_CONFIG_DOCTOOL_DIR([docs])
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
AC_SUBST([LIBGTKMM_SO_VERSION], [0:0:0])
AC_PROG_CXX
MM_AX_CXX_COMPILE_STDCXX([14], [noext],[mandatory])
AC_DISABLE_STATIC
LT_INIT([win32-dll])
PKG_CHECK_MODULES([GTK], [gtk+-4.0])
gdk_target_win32=no
gdk_target_quartz=no
gdk_target_x11=no
gdk_target_wayland=no
gdk_target_broadway=no
backends=`$PKG_CONFIG --variable=targets gtk+-4.0`
m4_foreach([mytarget], [[win32], [quartz], [x11], [wayland], [broadway]], [
AC_ARG_ENABLE(mytarget-backend,
AS_HELP_STRING([--enable-mytarget-backend@<:@=yes|no|check@:>@], [enable mytarget gdk target @<:@default=check@:>@]),
[], [enableval=check])
if test x$enableval != xno; then
for target in $backends; do
if test x$target = [x]mytarget; then
[gdk_target_]mytarget=yes
fi
done
if test x$enableval = xyes && test x$[gdk_target_]mytarget = xno; then
AC_MSG_ERROR([Requested mytarget backend not supported by installed gdk])
fi
fi
])
AM_CONDITIONAL([GDK_TARGET_WIN32], [test "x$gdk_target_win32" = xyes])
AM_CONDITIONAL([GDK_TARGET_QUARTZ], [test "x$gdk_target_quartz" = xyes])
AM_CONDITIONAL([GDK_TARGET_X11], [test "x$gdk_target_x11" = xyes])
AM_CONDITIONAL([GDK_TARGET_BROADWAY], [test "x$gdk_target_broadway" = xyes])
AM_CONDITIONAL([GDK_TARGET_WAYLAND], [test "x$gdk_target_wayland" = xyes])
if test "x$gdk_target_win32" = xyes ; then
AC_MSG_CHECKING([for native Windows host])
AS_CASE([$host_os], [mingw*], [gtkmm_host_windows=yes], [gtkmm_host_windows=no])
AC_MSG_RESULT([$gtkmm_host_windows])
else
gtkmm_host_windows=no
fi
AM_CONDITIONAL([HOST_WINDOWS_NATIVE], [test "x$gtkmm_host_windows" = xyes])
# TODO: What exactly does this do? If both static and shared libraries
# are built, both builds will have this macro defined!
AS_IF([test "x$enable_static" = xyes],
[AC_DEFINE([GTKMM_STATIC_LIB], [1], [Define when building gtkmm as a static library])])
# gdkmm really does need GTK+, because part of Gdk::DragContext is in GTK+.
# The extra gdk-pixbuf-2.0 check is because gdkmm requires a newer gdk-pixbuf than gtk+-4.0 requires.
# TODO: Remove the mention of cairomm once pangomm needs to depend on such a new version.
AC_SUBST([GDKMM_MODULES], ['giomm-2.56 >= 2.55.2 pangomm-2.42 >= 2.41.5 cairomm-1.16 >= 1.15.4 gtk+-4.0 >= 3.93.0 gdk-pixbuf-2.0 >= 2.35.5'])
AS_IF([test "x$gtkmm_host_windows" = xyes],
[GTKMM_MODULES=$GDKMM_MODULES],
[GTKMM_MODULES="$GDKMM_MODULES gtk+-unix-print-4.0"])
# Offer the ability to omit some API from the library, to reduce the code size.
# Note that there are other options in glibmm, which affect gtkmm.
GTKMM_ARG_ENABLE_API_ATKMM
AS_IF([test "x$gtkmm_enable_api_atkmm" != xno],
[GTKMM_MODULES="atkmm-2.28 >= 2.27.1 $GTKMM_MODULES"])
AC_SUBST([GTKMM_MODULES])
AC_SUBST([GTKMM_DEMOS_EXTRA_MODULES], ['epoxy >= 1.2'])
PKG_CHECK_MODULES([GDKMM], [$GDKMM_MODULES])
PKG_CHECK_MODULES([GTKMM], [$GTKMM_MODULES])
PKG_CHECK_MODULES([GTKMM_DEMOS_EXTRA], [$GTKMM_DEMOS_EXTRA_MODULES])
MM_PKG_CONFIG_SUBST([GTHREAD_CFLAGS], [--cflags-only-other gthread-2.0])
MM_PKG_CONFIG_SUBST([GTHREAD_LIBS], [--libs gthread-2.0])
MM_PKG_CONFIG_SUBST([GMMPROC_DIR], [--variable=gmmprocdir glibmm-2.56])
MM_PKG_CONFIG_SUBST([GMMPROC_EXTRA_M4_DIR], [--variable=gmmprocm4dir pangomm-2.42 atkmm-2.28])
MM_ARG_DISABLE_DEPRECATED_API([GDKMM GTKMM])
MM_ARG_ENABLE_DOCUMENTATION
MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++])
MM_ARG_WITH_TAGFILE_DOC([libsigc++-2.0.tag], [sigc++-2.0])
MM_ARG_WITH_TAGFILE_DOC([glibmm-2.56.tag], [glibmm-2.56])
MM_ARG_WITH_TAGFILE_DOC([cairomm-1.16.tag], [cairomm-1.16])
MM_ARG_WITH_TAGFILE_DOC([pangomm-2.42.tag], [pangomm-2.42])
MM_ARG_WITH_TAGFILE_DOC([atkmm-2.28.tag], [atkmm-2.28])
# glib-compile-resources and C compiler are needed to generate and compile
# resource files in demo programs.
AC_SUBST(GLIB_COMPILE_RESOURCES, [`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`])
AC_PROG_CC
AC_LANG([C++])
AC_CHECK_FUNCS([mkfifo])
# Evaluate the --enable-warnings=level option.
MM_ARG_ENABLE_WARNINGS([GTKMM_WXXFLAGS],
[-Wall],
[-pedantic -Wall -Wextra -Wformat-security -Wshadow -Wsuggest-override -Wno-long-long -DGSEAL_ENABLE],
[G PANGO ATK GDK GDK_PIXBUF GTK GLIBMM ATKMM PANGOMM CAIROMM SIGCXX])
AC_CONFIG_FILES([Makefile
tools/Makefile
gdk/${GDKMM_MODULE_NAME}.pc:gdk/gdkmm.pc.in
gdk/${GDKMM_MODULE_NAME}-uninstalled.pc:gdk/gdkmm-uninstalled.pc.in
gdk/src/Makefile
gdk/gdkmm/Makefile
gtk/${GTKMM_MODULE_NAME}.pc:gtk/gtkmm.pc.in
gtk/${GTKMM_MODULE_NAME}-uninstalled.pc:gtk/gtkmm-uninstalled.pc.in
gtk/src/Makefile
gtk/gtkmm/Makefile
tests/Makefile
demos/Makefile
docs/Makefile
docs/reference/Doxyfile
MSVC_Net2017/gdkmm/gdkmm.rc
MSVC_Net2017/gtkmm/gtkmm.rc
win32_installer/gtkmm-installer.nsi])
# Copy the generated configuration headers into the MSVC project directories.
AC_CONFIG_COMMANDS([MSVC_Net2017/gdkmm/gdkmmconfig.h],
[cp -f gdk/gdkmmconfig.h MSVC_Net2017/gdkmm/gdkmmconfig.h])
AC_CONFIG_COMMANDS([MSVC_Net2017/gtkmm/gtkmmconfig.h],
[cp -f gtk/gtkmmconfig.h MSVC_Net2017/gtkmm/gtkmmconfig.h])
AC_CONFIG_COMMANDS([win32_installer/lgpl.txt],
[cp -f COPYING win32_installer/lgpl.txt])
AC_OUTPUT