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
15 #We use pushdef here because we can't use shell variables before AC_INIT, but we want to use a variable with AC_INIT:
16 pushdef([GTKMM_MAJOR_VERSION], [2])
17 pushdef([GTKMM_MINOR_VERSION], [12])
18 pushdef([GTKMM_MICRO_VERSION], [3])
19 pushdef([GTKMM_EXTRA_VERSION], [])
20 pushdef([GTKMM_VERSION], GTKMM_MAJOR_VERSION.GTKMM_MINOR_VERSION.GTKMM_MICRO_VERSION[]GTKMM_EXTRA_VERSION)
21 AC_INIT([gtkmm], GTKMM_VERSION, [gtkmm-list@gnome.org])
22 AC_CONFIG_SRCDIR([gtk/gtkmmconfig.h.in])
25 #########################################################################
26 # Version and initialization
27 #########################################################################
28 [GTKMM_MAJOR_VERSION]=GTKMM_MAJOR_VERSION
29 [GTKMM_MINOR_VERSION]=GTKMM_MINOR_VERSION
30 [GTKMM_MICRO_VERSION]=GTKMM_MICRO_VERSION
31 [GTKMM_EXTRA_VERSION]=GTKMM_EXTRA_VERSION
32 [GTKMM_VERSION]=GTKMM_VERSION
33 popdef([GTKMM_MAJOR_VERSION])
34 popdef([GTKMM_MINOR_VERSION])
35 popdef([GTKMM_MICRO_VERSION])
36 popdef([GTKMM_EXTRA_VERSION])
37 popdef([GTKMM_VERSION])
38 GTKMM_RELEASE=$GTKMM_MAJOR_VERSION.$GTKMM_MINOR_VERSION
39 AC_DEFINE_UNQUOTED(GTKMM_MAJOR_VERSION, $GTKMM_MAJOR_VERSION, [Major version of gtkmm])
40 AC_DEFINE_UNQUOTED(GTKMM_MINOR_VERSION, $GTKMM_MINOR_VERSION, [Minor version of gtkmm])
41 AC_DEFINE_UNQUOTED(GTKMM_MICRO_VERSION, $GTKMM_MICRO_VERSION, [Micro version of gtkmm])
42 AC_SUBST(GTKMM_MAJOR_VERSION)
43 AC_SUBST(GTKMM_MINOR_VERSION)
44 AC_SUBST(GTKMM_MICRO_VERSION)
45 AC_SUBST(GTKMM_VERSION)
46 AC_SUBST(GTKMM_RELEASE)
49 # +1 : ? : +1 == new interface that does not break old one
50 # +1 : ? : 0 == new interface that breaks old one
51 # ? : ? : 0 == no new interfaces, but breaks apps
52 # ? :+1 : ? == just some internal changes, nothing breaks but might work
54 # CURRENT : REVISION : AGE
55 LIBGTKMM_SO_VERSION=1:30:0
56 AC_SUBST(LIBGTKMM_SO_VERSION)
58 AC_CONFIG_AUX_DIR(scripts)
60 # Initialize automake stuff
61 # tar-ustar asks it to use a sensible tar format that can handle long filenames.
62 AM_INIT_AUTOMAKE([1.9 tar-ustar])
64 dnl Specify a configuration file (no autoheader)
65 AM_CONFIG_HEADER(config.h gdk/gdkmmconfig.h gtk/gtkmmconfig.h)
67 AL_ACLOCAL_INCLUDE(scripts)
70 #########################################################################
72 #########################################################################
74 #########################################################################
76 #########################################################################
83 dnl Used for enabling the "-no-undefined" flag while generating DLLs
84 dnl Copied from the official gtk+-2 configure.in
85 AC_MSG_CHECKING([for some Win32 platform])
87 *-*-mingw*|*-*-cygwin*)
94 AC_MSG_RESULT([$platform_win32])
95 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
97 AC_MSG_CHECKING([for native Win32])
106 AC_MSG_RESULT([$os_win32])
107 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
113 AL_PROG_GNU_M4(AC_MSG_ERROR([dnl
114 SUN m4 does not work for building gtkmm.
115 Please install GNU m4.]))
117 AL_PROG_GNU_MAKE(AC_MSG_ERROR([dnl
118 SUN make does not work for building gtkmm.
119 Please install GNU make.]))
121 # This macro is installed by glibmm
122 # Doxygen needs the path to the installed perl.
123 GLIBMM_CHECK_PERL([5.6.0])
125 #########################################################################
127 #########################################################################
129 AC_CHECK_FUNC(mkfifo, AC_DEFINE(HAVE_MKFIFO))
131 # functions used in demos/gtk-demo. Undefined in config.h.
133 AC_MSG_CHECKING([for flockfile])
135 #include <stdio.h>],[
138 AC_DEFINE(HAVE_FLOCKFILE, 1,
139 [Define to 1 if you have the `flockfile' function.])],[
141 AC_MSG_CHECKING([for flockfile with a custom prototype])
145 extern "C" void flockfile (FILE *);],[
148 AC_DEFINE(HAVE_FLOCKFILE, 1,
149 [Define to 1 if you have the `flockfile' function.])
150 AC_DEFINE(NEED_FLOCKFILE_PROTO, 1,
151 [Define if flockfile() prototype needed.])],[
152 AC_MSG_RESULT(not available)])])
154 AC_MSG_CHECKING([for funlockfile])
156 #include <stdio.h>],[
157 funlockfile (NULL);],[
159 AC_DEFINE(HAVE_FUNLOCKFILE, 1,
160 [Define to 1 if you have the `funlockfile' function.])],[
162 AC_MSG_CHECKING([for funlockfile with a custom prototype])
166 extern "C" void funlockfile (FILE *);],[
167 funlockfile (NULL);],[
169 AC_DEFINE(HAVE_FUNLOCKFILE, 1,
170 [Define to 1 if you have the `funlockfile' function.])
171 AC_DEFINE(NEED_FUNLOCKFILE_PROTO, 1,
172 [Define if funlockfile() prototype needed.])],[
173 AC_MSG_RESULT(not available)])])
175 AC_MSG_CHECKING([for getc_unlocked])
177 #include <stdio.h>],[
178 getc_unlocked (NULL);],[
180 AC_DEFINE(HAVE_GETC_UNLOCKED, 1,
181 [Define to 1 if you have the `getc_unlocked' function.])],[
183 AC_MSG_CHECKING([for getc_unlocked with a custom prototype])
187 extern "C" int getc_unlocked (FILE *);],[
188 getc_unlocked (NULL);],[
190 AC_DEFINE(HAVE_GETC_UNLOCKED, 1,
191 [Define to 1 if you have the `getc_unlocked' function.])
192 AC_DEFINE(NEED_GETC_UNLOCKED_PROTO, 1,
193 [Define if getc_unlocked() prototype needed.])],[
194 AC_MSG_RESULT(not available)])])
197 #########################################################################
199 #########################################################################
200 gtkmm_min_glibmm_version=2.14.1
201 gtkmm_min_gtk_version=2.12.0
202 gtkmm_min_cairomm_version=1.1.12
205 GLIBMM_LIBDIR=`pkg-config --variable=libdir glibmm-2.4`
206 GMMPROC_DIR=$GLIBMM_LIBDIR/glibmm-2.4/proc
207 AC_SUBST(GMMPROC_DIR)
208 GMMPROC=$GMMPROC_DIR/gmmproc
212 PKG_CHECK_MODULES(ATKMM, glibmm-2.4 >= ${gtkmm_min_glibmm_version} atk >= 1.9.0)
213 AC_SUBST(ATKMM_CFLAGS)
216 PKG_CHECK_MODULES(PANGOMM, glibmm-2.4 >= ${gtkmm_min_glibmm_version} cairomm-1.0 >= ${gtkmm_min_cairomm_version} pangocairo >= 1.5.2)
217 AC_SUBST(PANGOMM_CFLAGS)
218 AC_SUBST(PANGOMM_LIBS)
220 # gdkmm really does need GTK+, because part of Gdk::DragContext is in GTK+.
221 PKG_CHECK_MODULES(GDKMM, glibmm-2.4 >= ${gtkmm_min_glibmm_version} cairomm-1.0 >= ${gtkmm_min_cairomm_version} gtk+-2.0 >= ${gtkmm_min_gtk_version})
222 AC_SUBST(GDKMM_CFLAGS)
225 # Only check for gtk+-unix-print-2.0 on non-win32 platform, as
226 # gtk+-unix-print-2.0.pc is not always included in win32 installers.
227 if test x"$os_win32" = xyes; then
228 PKG_CHECK_MODULES(GTKMM, glibmm-2.4 >= ${gtkmm_min_glibmm_version} cairomm-1.0 >= ${gtkmm_min_cairomm_version} gtk+-2.0 >= ${gtkmm_min_gtk_version})
230 PKG_CHECK_MODULES(GTKMM, glibmm-2.4 >= ${gtkmm_min_glibmm_version} cairomm-1.0 >= ${gtkmm_min_cairomm_version} gtk+-2.0 >= ${gtkmm_min_gtk_version} gtk+-unix-print-2.0 >= ${gtkmm_min_gtk_version})
232 AC_SUBST(GTKMM_CFLAGS)
235 # gthread isn't a requirement, but we should use its CFLAGS if available.
236 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.4.0,[],[GTHREAD_CFLAGS=''; GTHREAD_LIBS=''])
237 AC_SUBST(GTHREAD_CFLAGS)
238 AC_SUBST(GTHREAD_LIBS)
240 #########################################################################
242 #########################################################################
245 # Check for the SUN Forte compiler, and define GLIBMM_COMPILER_SUN_FORTE in the header.
248 # Ensure MSVC-compatible struct packing convention is used when
249 # compiling for Win32 with gcc.
250 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
251 # gcc2 uses "-fnative-struct".
252 if test x"$os_win32" = xyes; then
253 if test x"$GCC" = xyes -a x"$GXX" = xyes; then
255 AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
256 if test -z "$ac_cv_prog_CC"; then
259 our_gcc="$ac_cv_prog_CC"
261 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
263 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
264 msnative_struct='-fnative-struct'
268 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
269 msnative_struct='-mms-bitfields'
273 if test x"$msnative_struct" = x ; then
274 AC_MSG_RESULT([no way])
275 AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
277 CXXFLAGS="$CXXFLAGS $msnative_struct"
278 AC_MSG_RESULT([${msnative_struct}])
286 # Create a list of input directories for Doxygen.
287 GTKMM_DOXYGEN_INPUT_SUBDIRS([pango atk gdk gtk])
289 # Evaluate the --enable-warnings=level option.
290 GTKMM_ARG_ENABLE_WARNINGS()
292 # Add an --enable-use-deprecations configure option:
293 AC_ARG_ENABLE(deprecations,
294 [AC_HELP_STRING([--enable-use-deprecations],
295 [warn about deprecated usages [default=no]])],,
296 [enable_deprecations=no])
298 if test "x$enable_use_deprecations" = "xyes"; then
299 DISABLE_DEPRECATED_CFLAGS="\
300 -DG_DISABLE_DEPRECATED \
301 -DGDK_DISABLE_DEPRECATED \
302 -DGTK_DISABLE_DEPRECATED \
303 -DGDK_PIXBUF_DISABLE_DEPRECATED \
304 -DGNOME_DISABLE_DEPRECATED"
305 AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
308 # Add an --enable-deprecated-api option:
309 AC_ARG_ENABLE(deprecated-api, [AC_HELP_STRING([--enable-deprecated-api],
310 [include (build) deprecated API in the libraries [default=yes]])],,
311 [enable_deprecated_api=yes])
312 if test "x$enable_deprecated_api" = "xyes"; then
313 AC_MSG_WARN([Deprecated API will be built, for backwards-compatibility.])
315 AC_DEFINE(PANGOMM_DISABLE_DEPRECATED, 1, [Whether not to build deprecated API in pangomm])
316 AC_DEFINE(ATKMM_DISABLE_DEPRECATED, 1, [Whether not to build deprecated API in atkmm])
317 AC_DEFINE(GDKMM_DISABLE_DEPRECATED, 1, [Whether not to build deprecated API in gdkmm])
318 AC_DEFINE(GTKMM_DISABLE_DEPRECATED, 1, [Whether not to build deprecated API in gtkmm])
319 DISABLE_DEPRECATED_API_CFLAGS="-DPANGOMM_DISABLE_DEPRECATED -DATKMM_DISABLE_DEPRECATED -DGDKMM_DISABLE_DEPRECATED -DGTKMM_DISABLE_DEPRECATED"
320 AC_SUBST(DISABLE_DEPRECATED_API_CFLAGS)
321 AC_MSG_WARN([Deprecated API will not be built, breaking backwards-compatibility. Do not use this build for distribution packages.])
325 AC_ARG_ENABLE(examples, [AC_HELP_STRING([--enable-examples],
326 [build the included examples [default=yes]])],,
327 [enable_examples=yes])
328 if test "x$enable_examples" = "xyes"; then
329 EXAMPLE_SUBDIR="examples"
332 examples/arrow/Makefile
333 examples/base/Makefile
334 examples/book/Makefile
335 examples/book/alignment/Makefile
336 examples/book/aspectframe/Makefile
337 examples/book/box/Makefile
338 examples/book/builder/Makefile
339 examples/book/builder/basic/Makefile
340 examples/book/builder/derived/Makefile
341 examples/book/buttonbox/Makefile
342 examples/book/buttons/Makefile
343 examples/book/buttons/button/Makefile
344 examples/book/buttons/checkbutton/Makefile
345 examples/book/buttons/filechooserbutton/Makefile
346 examples/book/buttons/radiobutton/Makefile
347 examples/book/buttons/togglebutton/Makefile
348 examples/book/clipboard/Makefile
349 examples/book/clipboard/simple/Makefile
350 examples/book/clipboard/ideal/Makefile
351 examples/book/combobox/Makefile
352 examples/book/combobox/text/Makefile
353 examples/book/combobox/complex/Makefile
354 examples/book/comboboxentry/Makefile
355 examples/book/comboboxentry/text/Makefile
356 examples/book/comboboxentry/complex/Makefile
357 examples/book/custom/Makefile
358 examples/book/custom/custom_container/Makefile
359 examples/book/custom/custom_widget/Makefile
360 examples/book/dialogs/Makefile
361 examples/book/dialogs/aboutdialog/Makefile
362 examples/book/dialogs/colorselectiondialog/Makefile
363 examples/book/dialogs/filechooserdialog/Makefile
364 examples/book/dialogs/fileselection/Makefile
365 examples/book/dialogs/fontselectiondialog/Makefile
366 examples/book/dialogs/messagedialog/Makefile
367 examples/book/dialogs/simple/Makefile
368 examples/book/drag_and_drop/Makefile
369 examples/book/drawingarea/Makefile
370 examples/book/drawingarea/simple/Makefile
371 examples/book/drawingarea/curve/Makefile
372 examples/book/drawingarea/arcs/Makefile
373 examples/book/drawingarea/clock/Makefile
374 examples/book/drawingarea/joins/Makefile
375 examples/book/entry/Makefile
376 examples/book/entry/completion/Makefile
377 examples/book/entry/simple/Makefile
378 examples/book/eventbox/Makefile
379 examples/book/expander/Makefile
380 examples/book/frame/Makefile
381 examples/book/helloworld/Makefile
382 examples/book/helloworld2/Makefile
383 examples/book/iconview/Makefile
384 examples/book/idle/Makefile
385 examples/book/input/Makefile
386 examples/book/label/Makefile
387 examples/book/menus/Makefile
388 examples/book/menus/main_menu/Makefile
389 examples/book/menus/popup/Makefile
390 examples/book/menus_and_toolbars/Makefile
391 examples/book/notebook/Makefile
392 examples/book/paned/Makefile
393 examples/book/printing/Makefile
394 examples/book/printing/advanced/Makefile
395 examples/book/printing/simple/Makefile
396 examples/book/progressbar/Makefile
397 examples/book/recent_files/Makefile
398 examples/book/range_widgets/Makefile
399 examples/book/scrolledwindow/Makefile
400 examples/book/signals/Makefile
401 examples/book/signals/custom/Makefile
402 examples/book/socket/Makefile
403 examples/book/spinbutton/Makefile
404 examples/book/statusicon/Makefile
405 examples/book/table/Makefile
406 examples/book/textview/Makefile
407 examples/book/timeout/Makefile
408 examples/book/toolbar/Makefile
409 examples/book/tooltips/Makefile
410 examples/book/treeview/Makefile
411 examples/book/treeview/combo_renderer/Makefile
412 examples/book/treeview/editable_cells/Makefile
413 examples/book/treeview/list/Makefile
414 examples/book/treeview/listviewtext/Makefile
415 examples/book/treeview/tree/Makefile
416 examples/book/treeview/drag_and_drop/Makefile
417 examples/book/treeview/popup/Makefile
418 examples/book/treeview/filter/Makefile
419 examples/book/treeview/filter_modify/Makefile
420 examples/book/treeview/modelsort/Makefile
421 examples/book/update_ui/Makefile
422 examples/calendar/Makefile
423 examples/dnd/Makefile
424 examples/exception/Makefile
425 examples/gdk/Makefile
426 examples/rulers/Makefile
427 examples/statusbar/Makefile
428 examples/stock/Makefile
429 examples/tictactoe/Makefile
430 examples/treemodelcustom/Makefile
431 examples/window/Makefile
437 AC_SUBST(EXAMPLE_SUBDIR)
440 AC_ARG_ENABLE(demos, [AC_HELP_STRING([--enable-demos],
441 [build the included demos [default=yes]])],,
443 if test "x$enable_demos" = "xyes"; then
447 demos/gtk-demo/Makefile
453 AC_SUBST(DEMO_SUBDIR)
456 #Offer the ability to omit some API from the library,
457 #to reduce the code size:
458 #Note that there are other options in glibmm, which affect gtkmm.
459 GTKMM_ARG_ENABLE_API_ATKMM()
461 if test "x$gtkmm_enable_api_atkmm" = "xyes"; then
467 atk/atkmm/private/Makefile
469 GTKMM_PC_ATKMM_DEP="atkmm-1.6"
471 GTKMM_PC_ATKMM_DEP=""
473 AC_SUBST(GTKMM_PC_ATKMM_DEP)
475 #Allow us to test for atkmm support in Makefile.am files:
476 AM_CONDITIONAL(GTKMM_ATKMM_ENABLED, test "x$gtkmm_enable_api_atkmm" = "xyes")
479 GTKMM_ARG_ENABLE_API_MAEMO_EXTENSIONS()
482 AC_ARG_ENABLE(docs, [AC_HELP_STRING([--enable-docs],
483 [build the included docs [default=yes]])],,
485 if test "x$enable_docs" = "xyes"; then
491 docs/tutorial/Makefile
492 docs/tutorial/figures/Makefile
493 docs/tutorial/icons/Makefile
494 docs/reference/Makefile
495 docs/reference/Doxyfile
500 AC_SUBST(DOCS_SUBDIR)
502 # Dummy conditional just to make automake-1.4 happy.
503 # We need an always-false condition in docs/Makefile.am.
504 AM_CONDITIONAL(GTKMM_FALSE,[false])
506 # HACK: Assign a dummy in order to prevent execution of autoheader by the
507 # maintainer-mode rules. That would fail since we aren't using autoheader.
518 gdk/gdkmm/private/Makefile
524 gtk/gtkmm/private/Makefile
529 pango/pangomm/Makefile
530 pango/pangomm/private/Makefile
534 tools/extra_defs_gen/Makefile
539 tests/child_widget/Makefile
540 tests/child_widget2/Makefile
541 tests/child_widget_managed/Makefile
542 tests/refcount_dialog/Makefile
543 tests/dialog/Makefile
544 tests/dialog_deletethis/Makefile
545 tests/delete_cpp_child/Makefile
546 tests/main_with_options/Makefile
547 tests/menu_destruction/Makefile
548 tests/property_notification/Makefile
549 tests/scrolledwindow/Makefile
550 tests/wrap_existing/Makefile
558 MSVC_Net2003/Makefile
559 MSVC_Net2003/gendef/Makefile
560 MSVC_Net2003/atkmm/Makefile
561 MSVC_Net2003/atkmm/atkmm.rc
562 MSVC_Net2003/pangomm/Makefile
563 MSVC_Net2003/pangomm/pangomm.rc
564 MSVC_Net2003/gdkmm/Makefile
565 MSVC_Net2003/gdkmm/gdkmm.rc
566 MSVC_Net2003/gtkmm/Makefile
567 MSVC_Net2003/gtkmm/gtkmm.rc
568 MSVC_Net2003/demos/Makefile
569 MSVC_Net2003/demos/gtk-demo/Makefile
570 MSVC_Net2003/examples/Makefile
571 MSVC_Net2003/examples/arrow/Makefile
572 MSVC_Net2003/examples/calendar/Makefile
573 MSVC_Net2003/examples/cellrenderercustom_popup/Makefile
574 MSVC_Net2003/examples/cellrenderercustom_toggle/Makefile
575 MSVC_Net2003/examples/direction/Makefile
576 MSVC_Net2003/examples/dnd/Makefile
577 MSVC_Net2003/examples/exception/Makefile
578 MSVC_Net2003/examples/gdk/Makefile
579 MSVC_Net2003/examples/printing/Makefile
580 MSVC_Net2003/examples/rulers/Makefile
581 MSVC_Net2003/examples/statusbar/Makefile
582 MSVC_Net2003/examples/stock/Makefile
583 MSVC_Net2003/examples/tictactoe/Makefile
584 MSVC_Net2003/examples/treemodelcustom/Makefile
585 MSVC_Net2003/examples/window/Makefile