2005-11-22 12:26:26 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
AC_PREREQ([2.60])
|
2019-04-28 17:36:02 +02:00
|
|
|
AC_INIT([Geany], [1.36],
|
2017-03-19 18:57:38 +01:00
|
|
|
[https://github.com/geany/geany/issues])
|
2011-10-06 00:42:48 +00:00
|
|
|
AC_CONFIG_SRCDIR([src/geany.h])
|
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
2010-08-23 12:37:17 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2013-12-17 15:42:34 +01:00
|
|
|
AM_INIT_AUTOMAKE([1.11 -Wall parallel-tests subdir-objects])
|
2011-10-06 00:42:48 +00:00
|
|
|
AC_CONFIG_HEADERS([config.h])
|
2006-07-25 17:45:34 +00:00
|
|
|
|
2009-09-21 21:14:03 +00:00
|
|
|
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
|
|
|
|
2011-10-06 00:45:49 +00:00
|
|
|
GEANY_PREFIX
|
|
|
|
GEANY_DOCDIR
|
|
|
|
|
|
|
|
GEANY_STATUS_ADD([Install Geany in], [${prefix}])
|
|
|
|
if test -n "${build}" -a -n "${target}"; then
|
|
|
|
GEANY_STATUS_ADD([Building Geany on], [${build}])
|
|
|
|
GEANY_STATUS_ADD([Building Geany for], [${target}])
|
|
|
|
fi
|
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
# why do we use this?
|
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
2005-11-22 12:26:26 +00:00
|
|
|
|
2013-12-17 15:41:22 +01:00
|
|
|
m4_ifdef([AM_PROG_AR],[AM_PROG_AR])
|
2015-04-17 15:11:00 +02:00
|
|
|
LT_INIT([disable-static])
|
2005-11-22 12:26:26 +00:00
|
|
|
AC_PROG_CC
|
2013-10-20 15:19:56 +02:00
|
|
|
AC_PROG_CC_C99
|
2013-12-17 15:42:34 +01:00
|
|
|
AM_PROG_CC_C_O
|
2007-07-11 15:27:57 +00:00
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
AC_PROG_CXX
|
2016-07-31 00:40:58 +02:00
|
|
|
GEANY_PROG_CXX
|
2017-07-24 16:24:05 -07:00
|
|
|
AX_CXX_COMPILE_STDCXX_11
|
2008-04-09 16:08:34 +00:00
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
|
|
|
|
# autoscan start
|
|
|
|
|
|
|
|
# Checks for header files.
|
2016-10-07 15:26:42 +02:00
|
|
|
AC_CHECK_HEADERS([fcntl.h glob.h stdlib.h sys/time.h errno.h limits.h])
|
|
|
|
|
|
|
|
# Checks for dependencies needed by ctags
|
|
|
|
AC_CHECK_HEADERS([fnmatch.h direct.h io.h sys/dir.h])
|
2017-02-15 11:36:56 +01:00
|
|
|
AC_DEFINE([USE_STDBOOL_H], [1], [whether or not to use <stdbool.h>.])
|
|
|
|
AC_DEFINE([CTAGS_LIB], [1], [compile ctags as a library.])
|
2005-11-22 12:26:26 +00:00
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_TYPE_OFF_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_STRUCT_TM
|
|
|
|
|
|
|
|
# Checks for library functions.
|
2018-12-08 21:07:54 +01:00
|
|
|
AC_CHECK_FUNCS([fgetpos fnmatch mkstemp strerror strstr])
|
|
|
|
|
|
|
|
# Function checks for u-ctags
|
|
|
|
AC_CHECK_FUNCS([strcasecmp stricmp], [break])
|
|
|
|
AC_CHECK_FUNCS([strncasecmp strnicmp], [break])
|
|
|
|
AC_CHECK_FUNCS([truncate ftruncate chsize], [break])
|
|
|
|
# non-functions checks for u-ctags. Not that we really need those as we don't
|
|
|
|
# use u-ctags's main, but the corresponding macros have to be defined to
|
|
|
|
# something, so simply perform the actual checks.
|
|
|
|
AC_CHECK_DECLS([__environ],,,[[#include <unistd.h>]])
|
|
|
|
AC_CHECK_DECLS([_NSGetEnviron],,,[[#include <crt_externs.h>]])
|
2005-11-22 12:26:26 +00:00
|
|
|
|
|
|
|
# autoscan end
|
|
|
|
|
2011-10-06 00:45:33 +00:00
|
|
|
|
2016-01-09 19:59:09 +01:00
|
|
|
# check for VCS revision
|
|
|
|
GEANY_CHECK_REVISION([dnl force debug mode for a VCS working copy
|
2011-10-06 00:43:09 +00:00
|
|
|
CFLAGS="-g -DGEANY_DEBUG $CFLAGS"])
|
2006-05-21 17:51:22 +00:00
|
|
|
|
2015-04-04 14:13:18 +02:00
|
|
|
# GTK version check
|
2012-09-15 13:41:46 +02:00
|
|
|
AC_ARG_ENABLE([gtk3],
|
|
|
|
[AS_HELP_STRING([--enable-gtk3],
|
2015-04-04 14:13:18 +02:00
|
|
|
[compile against GTK3 [default=auto]])],
|
2012-09-15 13:41:46 +02:00
|
|
|
[enable_gtk3=$enableval],
|
2015-04-04 14:13:18 +02:00
|
|
|
[enable_gtk3=auto])
|
|
|
|
|
|
|
|
gtk2_package=gtk+-2.0
|
|
|
|
gtk2_min_version=2.24
|
|
|
|
gtk3_package=gtk+-3.0
|
|
|
|
gtk3_min_version=3.0
|
|
|
|
|
|
|
|
PKG_CHECK_EXISTS([$gtk2_package >= $gtk2_min_version], [have_gtk2=yes], [have_gtk2=no])
|
|
|
|
PKG_CHECK_EXISTS([$gtk3_package >= $gtk3_min_version], [have_gtk3=yes], [have_gtk3=no])
|
|
|
|
AS_IF([test "x$enable_gtk3" = xyes || (test "x$enable_gtk3" != xno &&
|
|
|
|
test "x$have_gtk3" = xyes &&
|
|
|
|
test "x$have_gtk2" = xno)],
|
|
|
|
[gtk_package=$gtk3_package
|
|
|
|
gtk_min_version=$gtk3_min_version],
|
|
|
|
[gtk_package=$gtk2_package
|
|
|
|
gtk_min_version=$gtk2_min_version])
|
|
|
|
AM_CONDITIONAL([GTK3], [test "x$gtk_package" = "x$gtk3_package"])
|
2012-09-15 13:41:46 +02:00
|
|
|
|
2011-06-13 18:41:15 +00:00
|
|
|
# GTK/GLib/GIO checks
|
2016-05-17 13:01:34 +02:00
|
|
|
gtk_modules="$gtk_package >= $gtk_min_version glib-2.0 >= 2.32"
|
|
|
|
gtk_modules_private="gio-2.0 >= 2.32 gmodule-no-export-2.0"
|
2012-04-12 17:39:10 +02:00
|
|
|
PKG_CHECK_MODULES([GTK], [$gtk_modules $gtk_modules_private])
|
|
|
|
AC_SUBST([DEPENDENCIES], [$gtk_modules])
|
2016-05-17 13:01:34 +02:00
|
|
|
AS_VAR_APPEND([GTK_CFLAGS], [" -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"])
|
2016-02-24 20:31:58 +01:00
|
|
|
dnl Disable all GTK deprecations on 3.x so long as we want to keep 2.x support and only require 3.0.
|
|
|
|
dnl No need on 2.x as we target the latest version.
|
|
|
|
AM_COND_IF([GTK3], [AS_VAR_APPEND([GTK_CFLAGS], [" -DGDK_DISABLE_DEPRECATION_WARNINGS"])])
|
2011-10-06 00:42:48 +00:00
|
|
|
AC_SUBST([GTK_CFLAGS])
|
|
|
|
AC_SUBST([GTK_LIBS])
|
2012-09-15 13:41:46 +02:00
|
|
|
GTK_VERSION=`$PKG_CONFIG --modversion $gtk_package`
|
2015-06-23 07:11:08 +02:00
|
|
|
AC_SUBST([GTK_VERSION])
|
2011-10-06 00:45:33 +00:00
|
|
|
GEANY_STATUS_ADD([Using GTK version], [${GTK_VERSION}])
|
2011-03-27 15:04:58 +00:00
|
|
|
# GTHREAD checks
|
|
|
|
gthread_modules="gthread-2.0"
|
2011-10-06 00:42:48 +00:00
|
|
|
PKG_CHECK_MODULES([GTHREAD], [$gthread_modules])
|
|
|
|
AC_SUBST([GTHREAD_CFLAGS])
|
|
|
|
AC_SUBST([GTHREAD_LIBS])
|
2005-11-22 12:26:26 +00:00
|
|
|
|
2015-07-10 22:58:48 +02:00
|
|
|
# --disable-deprecated switch for GTK purification
|
2011-10-06 00:42:48 +00:00
|
|
|
AC_ARG_ENABLE([deprecated],
|
|
|
|
[AS_HELP_STRING([--disable-deprecated], [Disable deprecated GTK functions.])],
|
|
|
|
[GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"],
|
|
|
|
[])
|
|
|
|
|
2007-07-17 08:21:19 +00:00
|
|
|
|
2011-10-06 00:45:49 +00:00
|
|
|
# Check for binary relocation support
|
|
|
|
GEANY_CHECK_BINRELOC
|
2012-01-01 17:57:18 +00:00
|
|
|
# CTags source compatibility (we actually use GRegex instead of POSIX regcomp)
|
|
|
|
AC_DEFINE([HAVE_REGCOMP], [1], [Should always be 1, required for CTags.])
|
2007-06-26 16:17:16 +00:00
|
|
|
# Plugins support
|
2011-10-06 00:44:06 +00:00
|
|
|
GEANY_CHECK_PLUGINS
|
2011-10-06 00:42:48 +00:00
|
|
|
# check for mingw specific settings
|
2011-10-06 00:44:48 +00:00
|
|
|
GEANY_CHECK_MINGW
|
2006-07-25 17:45:34 +00:00
|
|
|
|
2011-10-06 00:44:48 +00:00
|
|
|
GEANY_CHECK_SOCKET
|
|
|
|
GEANY_CHECK_VTE
|
2015-02-04 00:27:34 +01:00
|
|
|
GEANY_CHECK_MAC_INTEGRATION
|
2011-10-06 00:46:09 +00:00
|
|
|
GEANY_CHECK_THE_FORCE dnl hehe
|
2006-05-14 16:07:30 +00:00
|
|
|
|
|
|
|
# i18n
|
2011-10-06 00:44:25 +00:00
|
|
|
GEANY_I18N
|
2005-11-22 12:26:26 +00:00
|
|
|
|
2015-02-24 23:59:46 +01:00
|
|
|
# double eval since datarootdir is usually defined as ${prefix}/share
|
|
|
|
AM_COND_IF([MINGW],
|
|
|
|
[pkgdatadir='${prefix}/data'],
|
|
|
|
[pkgdatadir='${datarootdir}/geany'])
|
|
|
|
AC_SUBST([GEANY_DATA_DIR], [$(eval echo $(eval echo $pkgdatadir))])
|
|
|
|
AC_SUBST([pkgdatadir])
|
2006-01-15 18:44:38 +00:00
|
|
|
|
2014-04-27 15:19:56 -07:00
|
|
|
# Documentation tools
|
|
|
|
GEANY_CHECK_DOCUTILS
|
2014-04-26 23:05:22 -07:00
|
|
|
GEANY_CHECK_DOXYGEN
|
2016-02-18 22:51:30 +01:00
|
|
|
GEANY_CHECK_GTKDOC_HEADER
|
2014-04-26 23:05:22 -07:00
|
|
|
|
2014-10-13 23:07:11 -07:00
|
|
|
# libgeany
|
|
|
|
GEANY_LIB_INIT
|
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
# Output
|
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
icons/Makefile
|
|
|
|
icons/16x16/Makefile
|
2012-10-17 22:18:54 +02:00
|
|
|
icons/24x24/Makefile
|
|
|
|
icons/32x32/Makefile
|
2011-10-06 00:42:48 +00:00
|
|
|
icons/48x48/Makefile
|
|
|
|
icons/scalable/Makefile
|
2012-10-17 22:18:54 +02:00
|
|
|
icons/tango/Makefile
|
|
|
|
icons/tango/16x16/Makefile
|
|
|
|
icons/tango/24x24/Makefile
|
|
|
|
icons/tango/32x32/Makefile
|
|
|
|
icons/tango/48x48/Makefile
|
|
|
|
icons/tango/scalable/Makefile
|
2016-06-11 12:35:11 +02:00
|
|
|
ctags/Makefile
|
2011-10-06 00:42:48 +00:00
|
|
|
scintilla/Makefile
|
|
|
|
scintilla/include/Makefile
|
|
|
|
src/Makefile
|
2016-06-11 12:35:11 +02:00
|
|
|
src/tagmanager/Makefile
|
2011-10-06 00:42:48 +00:00
|
|
|
plugins/Makefile
|
|
|
|
po/Makefile.in
|
2014-04-15 14:30:00 +02:00
|
|
|
data/Makefile
|
2011-10-06 00:42:48 +00:00
|
|
|
doc/Makefile
|
|
|
|
doc/geany.1
|
|
|
|
geany.pc
|
2015-06-23 07:11:08 +02:00
|
|
|
geany.nsi
|
2011-10-06 00:42:48 +00:00
|
|
|
doc/Doxyfile
|
2013-06-23 15:08:27 +02:00
|
|
|
tests/Makefile
|
|
|
|
tests/ctags/Makefile
|
2005-11-22 12:26:26 +00:00
|
|
|
])
|
2011-10-06 00:42:48 +00:00
|
|
|
AC_OUTPUT
|
|
|
|
|
|
|
|
# Summary
|
2011-10-06 00:45:33 +00:00
|
|
|
GEANY_STATUS_OUTPUT
|
2006-02-14 22:17:36 +00:00
|
|
|
echo ""
|
2005-11-22 12:26:26 +00:00
|
|
|
echo "Configuration is done OK."
|
|
|
|
echo ""
|