3 # This file tests for various compiler features needed to configure
4 # the gtkmm package. Original skeleton was provided by Stephan Kulow.
5 # All tests were written by Tero Pulkkinen, Mirko Streckenbach, and
8 # NOTE! IF YOU DO CHANGES HERE, CHECK IF YOU NEED TO MODIFY .m4 TOO!!!
10 # Copyright 2001 Free Software Foundation
11 # Copyright 1999 gtkmm Development Team
12 # Copyright 1998 Stephan Kulow
14 AC_INIT(glib/glibmmconfig.h.in)
17 #########################################################################
18 # Version and initialization
19 #########################################################################
20 GLIBMM_MAJOR_VERSION=2
21 GLIBMM_MINOR_VERSION=13
22 GLIBMM_MICRO_VERSION=3
23 GLIBMM_VERSION=$GLIBMM_MAJOR_VERSION.$GLIBMM_MINOR_VERSION.$GLIBMM_MICRO_VERSION
24 GLIBMM_RELEASE=$GLIBMM_MAJOR_VERSION.$GLIBMM_MINOR_VERSION
25 AC_DEFINE_UNQUOTED([GLIBMM_MAJOR_VERSION], $GLIBMM_MAJOR_VERSION, [Major Version])
26 AC_DEFINE_UNQUOTED([GLIBMM_MINOR_VERSION], $GLIBMM_MINOR_VERSION, [Minor Version])
27 AC_DEFINE_UNQUOTED([GLIBMM_MICRO_VERSION], $GLIBMM_MICRO_VERSION, [Micro Version])
28 AC_SUBST(GLIBMM_MAJOR_VERSION)
29 AC_SUBST(GLIBMM_MINOR_VERSION)
30 AC_SUBST(GLIBMM_MICRO_VERSION)
31 AC_SUBST(GLIBMM_VERSION)
32 AC_SUBST(GLIBMM_RELEASE)
35 # +1 : ? : +1 == new interface that does not break old one
36 # +1 : ? : 0 == new interface that breaks old one
37 # ? : ? : 0 == no new interfaces, but breaks apps
38 # ? :+1 : ? == just some internal changes, nothing breaks but might work
40 # CURRENT : REVISION : AGE
41 LIBGLIBMM_SO_VERSION=1:24:0
42 AC_SUBST(LIBGLIBMM_SO_VERSION)
44 AC_CONFIG_AUX_DIR(scripts)
47 VERSION=$GLIBMM_VERSION
50 dnl Initialize automake stuff
51 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
53 dnl Specify a configuration file (no autoheader)
54 AM_CONFIG_HEADER(config.h glib/glibmmconfig.h)
56 AL_ACLOCAL_INCLUDE(scripts)
59 #########################################################################
61 #########################################################################
63 #########################################################################
65 #########################################################################
72 dnl Used for enabling the "-no-undefined" flag while generating DLLs
73 dnl Copied from the official gtk+-2 configure.in
74 AC_MSG_CHECKING([for some Win32 platform])
76 *-*-mingw*|*-*-cygwin*)
83 AC_MSG_RESULT([$platform_win32])
84 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
86 AC_MSG_CHECKING([for native Win32])
95 AC_MSG_RESULT([$os_win32])
96 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
102 AL_PROG_GNU_M4(AC_MSG_ERROR([dnl
103 SUN m4 does not work for building gtkmm.
104 Please install GNU m4.]))
106 AL_PROG_GNU_MAKE(AC_MSG_ERROR([dnl
107 SUN make does not work for building gtkmm.
108 Please install GNU make.]))
110 GLIBMM_CHECK_PERL([5.6.0])
112 #########################################################################
114 #########################################################################
116 # functions used in demos/gtk-demo. Undefined in config.h !
117 AC_CHECK_FUNCS([flockfile funlockfile getc_unlocked mkfifo])
119 #########################################################################
121 #########################################################################
122 gtkmm_min_sigc_version=2.0.0
123 gtkmm_min_glib_version=2.9.0
125 PKG_CHECK_MODULES(GLIBMM, sigc++-2.0 >= ${gtkmm_min_sigc_version} glib-2.0 >= ${gtkmm_min_glib_version} gobject-2.0 >= ${gtkmm_min_glib_version} gmodule-2.0 >= ${gtkmm_min_glib_version})
126 AC_SUBST(GLIBMM_CFLAGS)
127 AC_SUBST(GLIBMM_LIBS)
129 # gthread isn't a requirement, but we should use its CFLAGS if available.
130 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= ${gtkmm_min_glib_version},[],[GTHREAD_CFLAGS=''; GTHREAD_LIBS=''])
131 AC_SUBST(GTHREAD_CFLAGS)
132 AC_SUBST(GTHREAD_LIBS)
135 #########################################################################
137 #########################################################################
140 # Check for the SUN Forte compiler, and define GLIBMM_COMPILER_SUN_FORTE in the header.
143 # Ensure MSVC-compatible struct packing convention is used when
144 # compiling for Win32 with gcc.
145 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
146 # gcc2 uses "-fnative-struct".
147 if test x"$os_win32" = xyes; then
148 if test x"$GCC" = xyes -a x"$GXX" = xyes; then
150 AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
151 if test -z "$ac_cv_prog_CC"; then
154 our_gcc="$ac_cv_prog_CC"
156 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
158 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
159 msnative_struct='-fnative-struct'
163 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
164 msnative_struct='-mms-bitfields'
168 if test x"$msnative_struct" = x ; then
169 AC_MSG_RESULT([no way])
170 AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
172 CXXFLAGS="$CXXFLAGS $msnative_struct"
173 AC_MSG_RESULT([${msnative_struct}])
180 AC_CXX_BOOL(,config_error=yes)
181 AC_CXX_NAMESPACES(,config_error=yes)
182 AC_CXX_MUTABLE(,config_error=yes)
184 AC_MSG_CHECKING(if C++ environment provides all required features)
185 if test "x$config_error" = xyes ; then
187 AC_MSG_ERROR([Your compiler is not powerful enough to compile gtkmm. If it should be, see config.log for more information of why it failed.])
191 GLIBMM_CXX_HAS_NAMESPACE_STD()
192 GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS()
193 GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR()
194 GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS()
195 GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES()
196 GLIBMM_CXX_CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS()
197 GLIBMM_CXX_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION()
198 GLIBMM_CXX_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS()
199 GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC()
200 GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS()
203 # Create a list of input directories for Doxygen.
204 GTKMM_DOXYGEN_INPUT_SUBDIRS([glib])
206 # Check whether to build the full docs into the generated source.
207 # This will be much slower.
208 GTKMM_ARG_ENABLE_FULLDOCS()
210 # Check whether --enable-debug-refcounting was given.
211 GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING()
213 # Evaluate the --enable-warnings=level option.
214 GTKMM_ARG_ENABLE_WARNINGS()
216 # Add an --enable-use-deprecations configure option:
217 AC_ARG_ENABLE(deprecations,
218 [AC_HELP_STRING([--enable-use-deprecations],
219 [warn about deprecated usages [default=no]])],,
220 [enable_deprecations=no])
222 if test "x$enable_use_deprecations" = "xyes"; then
223 DISABLE_DEPRECATED_CFLAGS="-DG_DISABLE_DEPRECATED"
224 AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
227 #Offer the ability to omit some API from the library,
228 #to reduce the code size:
229 GLIBMM_ARG_ENABLE_API_DEPRECATED()
230 GLIBMM_ARG_ENABLE_API_EXCEPTIONS()
231 GLIBMM_ARG_ENABLE_API_PROPERTIES()
232 GLIBMM_ARG_ENABLE_API_VFUNCS()
234 # Offer the ability to omit some API from the library,
235 # to reduce the code size:
236 GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS()
238 # Dummy conditional just to make automake-1.4 happy.
239 # We need an always-false condition in docs/Makefile.am.
240 AM_CONDITIONAL(GTKMM_FALSE,[false])
242 # HACK: Assign a dummy in order to prevent execution of autoheader by the
243 # maintainer-mode rules. That would fail since we aren't using autoheader.
254 glib/glibmm/private/Makefile
258 tools/generate_wrap_init.pl
261 tools/extra_defs_gen/Makefile
266 tests/glibmm_value/Makefile
269 examples/markup/Makefile
270 examples/options/Makefile
271 examples/thread/Makefile
272 examples/iochannel_stream/Makefile
273 examples/child_watch/Makefile
279 docs/reference/Makefile
280 docs/reference/Doxyfile
281 docs/reference/beautify_docs.pl
282 docs/internal/Makefile
286 MSVC_Net2003/Makefile
287 MSVC_Net2003/gendef/Makefile
288 MSVC_Net2003/glibmm/Makefile
289 MSVC_Net2003/glibmm/glibmm.rc
290 MSVC_Net2003/examples/Makefile
291 MSVC_Net2003/examples/dispatcher/Makefile
292 MSVC_Net2003/examples/dispatcher2/Makefile
293 MSVC_Net2003/examples/markup/Makefile
294 MSVC_Net2003/examples/options/Makefile
295 MSVC_Net2003/examples/thread/Makefile
296 MSVC_Net2003/examples/thread_pool/Makefile
297 MSVC_Net2003/tests/Makefile
298 MSVC_Net2003/tests/glibmm_value/Makefile