1 dnl Process this file with autoconf to produce a configure script.
4 AC_INIT([Geany], [1.32],
5 [https://github.com/geany/geany/issues])
6 AC_CONFIG_SRCDIR([src/geany.h])
7 AC_CONFIG_AUX_DIR([build-aux])
8 AC_CONFIG_MACRO_DIR([m4])
9 AM_INIT_AUTOMAKE([1.11 -Wall parallel-tests subdir-objects])
10 AC_CONFIG_HEADERS([config.h])
12 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
17 GEANY_STATUS_ADD([Install Geany in], [${prefix}])
18 if test -n "${build}" -a -n "${target}"; then
19 GEANY_STATUS_ADD([Building Geany on], [${build}])
20 GEANY_STATUS_ADD([Building Geany for], [${target}])
24 AC_USE_SYSTEM_EXTENSIONS
26 m4_ifdef([AM_PROG_AR],[AM_PROG_AR])
27 LT_INIT([disable-static])
34 AX_CXX_COMPILE_STDCXX_11
41 # Checks for header files.
42 AC_CHECK_HEADERS([fcntl.h fnmatch.h glob.h stdlib.h sys/time.h])
44 # Checks for typedefs, structures, and compiler characteristics.
49 # Checks for library functions.
50 AC_CHECK_FUNCS([ftruncate fgetpos fnmatch mkstemp strerror strstr])
55 # check for VCS revision
56 GEANY_CHECK_REVISION([dnl force debug mode for a VCS working copy
57 CFLAGS="-g -DGEANY_DEBUG $CFLAGS"])
61 [AS_HELP_STRING([--enable-gtk3],
62 [compile with GTK3 support (experimental) [default=no]])],
63 [enable_gtk3=$enableval],
66 AS_IF([test "x$enable_gtk3" = xyes],
70 gtk_min_version=2.24])
71 AM_CONDITIONAL([GTK3], [test "x$gtk_package" = "xgtk+-3.0"])
74 gtk_modules="$gtk_package >= $gtk_min_version glib-2.0 >= 2.32"
75 gtk_modules_private="gio-2.0 >= 2.32 gmodule-no-export-2.0"
76 PKG_CHECK_MODULES([GTK], [$gtk_modules $gtk_modules_private])
77 AC_SUBST([DEPENDENCIES], [$gtk_modules])
78 AS_VAR_APPEND([GTK_CFLAGS], [" -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"])
79 dnl Disable all GTK deprecations on 3.x so long as we want to keep 2.x support and only require 3.0.
80 dnl No need on 2.x as we target the latest version.
81 AM_COND_IF([GTK3], [AS_VAR_APPEND([GTK_CFLAGS], [" -DGDK_DISABLE_DEPRECATION_WARNINGS"])])
82 AC_SUBST([GTK_CFLAGS])
84 GTK_VERSION=`$PKG_CONFIG --modversion $gtk_package`
85 AC_SUBST([GTK_VERSION])
86 GEANY_STATUS_ADD([Using GTK version], [${GTK_VERSION}])
88 gthread_modules="gthread-2.0"
89 PKG_CHECK_MODULES([GTHREAD], [$gthread_modules])
90 AC_SUBST([GTHREAD_CFLAGS])
91 AC_SUBST([GTHREAD_LIBS])
93 # --disable-deprecated switch for GTK purification
94 AC_ARG_ENABLE([deprecated],
95 [AS_HELP_STRING([--disable-deprecated], [Disable deprecated GTK functions.])],
96 [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"],
100 # Check for binary relocation support
102 # CTags source compatibility (we actually use GRegex instead of POSIX regcomp)
103 AC_DEFINE([HAVE_REGCOMP], [1], [Should always be 1, required for CTags.])
106 # check for mingw specific settings
111 GEANY_CHECK_MAC_INTEGRATION
112 GEANY_CHECK_THE_FORCE dnl hehe
117 # double eval since datarootdir is usually defined as ${prefix}/share
119 [pkgdatadir='${prefix}/data'],
120 [pkgdatadir='${datarootdir}/geany'])
121 AC_SUBST([GEANY_DATA_DIR], [$(eval echo $(eval echo $pkgdatadir))])
122 AC_SUBST([pkgdatadir])
124 # Documentation tools
127 GEANY_CHECK_GTKDOC_HEADER
140 icons/scalable/Makefile
142 icons/tango/16x16/Makefile
143 icons/tango/24x24/Makefile
144 icons/tango/32x32/Makefile
145 icons/tango/48x48/Makefile
146 icons/tango/scalable/Makefile
149 scintilla/include/Makefile
151 src/tagmanager/Makefile
169 echo "Configuration is done OK."