1 dnl Process this file with autoconf to produce a configure script.
4 AC_INIT([Geany], [1.25],
5 [https://sourceforge.net/tracker/?group_id=153444&atid=787791])
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])
33 # check for C++ compiler explicitly and fail if none is found, do this check
34 # after AC_PROG_CXX has set the CXX environment variable
35 if ! which $CXX >/dev/null 2>&1; then
36 AC_MSG_ERROR([No C++ compiler found. Please install a C++ compiler.])
44 # Checks for header files.
45 AC_CHECK_HEADERS([fcntl.h fnmatch.h glob.h stdlib.h sys/time.h])
47 # Checks for typedefs, structures, and compiler characteristics.
52 # Checks for library functions.
53 AC_CHECK_FUNCS([ftruncate fgetpos fnmatch mkstemp strerror strstr])
58 # check for SVN revision
59 GEANY_CHECK_REVISION([dnl force debug mode for a SVN working copy
60 CFLAGS="-g -DGEANY_DEBUG $CFLAGS"])
64 [AS_HELP_STRING([--enable-gtk3],
65 [compile with GTK3 support (experimental) [default=no]])],
66 [enable_gtk3=$enableval],
69 AS_IF([test "x$enable_gtk3" = xyes],
73 gtk_min_version=2.16])
74 AM_CONDITIONAL([GTK3], [test "x$gtk_package" = "xgtk+-3.0"])
77 gtk_modules="$gtk_package >= $gtk_min_version glib-2.0 >= 2.20"
78 gtk_modules_private="gio-2.0 >= 2.20 gmodule-no-export-2.0"
79 PKG_CHECK_MODULES([GTK], [$gtk_modules $gtk_modules_private])
80 AC_SUBST([DEPENDENCIES], [$gtk_modules])
81 AC_SUBST([GTK_CFLAGS])
83 GTK_VERSION=`$PKG_CONFIG --modversion $gtk_package`
84 GEANY_STATUS_ADD([Using GTK version], [${GTK_VERSION}])
86 gthread_modules="gthread-2.0"
87 PKG_CHECK_MODULES([GTHREAD], [$gthread_modules])
88 AC_SUBST([GTHREAD_CFLAGS])
89 AC_SUBST([GTHREAD_LIBS])
91 # --disable-deprecated switch for GTK2 purification
92 AC_ARG_ENABLE([deprecated],
93 [AS_HELP_STRING([--disable-deprecated], [Disable deprecated GTK functions.])],
94 [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"],
98 # Check for binary relocation support
100 # CTags source compatibility (we actually use GRegex instead of POSIX regcomp)
101 AC_DEFINE([HAVE_REGCOMP], [1], [Should always be 1, required for CTags.])
104 # check for mingw specific settings
109 GEANY_CHECK_MAC_INTEGRATION
110 GEANY_CHECK_THE_FORCE dnl hehe
115 # double eval since datarootdir is usually defined as ${prefix}/share
117 [pkgdatadir='${prefix}/data'],
118 [pkgdatadir='${datarootdir}/geany'])
119 AC_SUBST([GEANY_DATA_DIR], [$(eval echo $(eval echo $pkgdatadir))])
120 AC_SUBST([pkgdatadir])
122 # Documentation tools
137 icons/scalable/Makefile
139 icons/tango/16x16/Makefile
140 icons/tango/24x24/Makefile
141 icons/tango/32x32/Makefile
142 icons/tango/48x48/Makefile
143 icons/tango/scalable/Makefile
145 tagmanager/ctags/Makefile
146 tagmanager/mio/Makefile
147 tagmanager/src/Makefile
149 scintilla/include/Makefile
167 echo "Configuration is done OK."