2005-11-22 12:26:26 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2005-12-29 20:11:07 +00:00
|
|
|
dnl $Id$
|
2005-11-22 12:26:26 +00:00
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
AC_PREREQ([2.60])
|
|
|
|
AC_INIT([Geany], [1.22],
|
|
|
|
[https://sourceforge.net/tracker/?group_id=153444&atid=787791])
|
|
|
|
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])
|
2011-10-06 00:42:48 +00:00
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
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:42:48 +00:00
|
|
|
# why do we use this?
|
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
2005-11-22 12:26:26 +00:00
|
|
|
|
|
|
|
AC_PROG_CC
|
2007-07-11 15:27:57 +00:00
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
AC_PROG_CXX
|
2008-04-09 16:08:34 +00:00
|
|
|
# check for C++ compiler explicitly and fail if none is found, do this check
|
|
|
|
# after AC_PROG_CXX has set the CXX environment variable
|
2011-10-06 00:42:48 +00:00
|
|
|
if ! which $CXX >/dev/null 2>&1; then
|
2009-09-27 11:20:12 +00:00
|
|
|
AC_MSG_ERROR([No C++ compiler found. Please install a C++ compiler.])
|
2008-04-09 16:08:34 +00:00
|
|
|
fi
|
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
|
|
|
|
# autoscan start
|
|
|
|
|
|
|
|
# Checks for header files.
|
2008-06-05 16:52:39 +00:00
|
|
|
AC_CHECK_HEADERS([fcntl.h fnmatch.h glob.h regex.h stdlib.h sys/time.h])
|
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.
|
2010-08-25 11:44:33 +00:00
|
|
|
AC_CHECK_FUNCS([gethostname ftruncate fgetpos mkstemp strerror strstr])
|
2005-11-22 12:26:26 +00:00
|
|
|
|
|
|
|
# autoscan end
|
|
|
|
|
2006-05-21 17:51:22 +00:00
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
# check for SVN revision
|
2011-10-06 00:43:09 +00:00
|
|
|
GEANY_CHECK_REVISION([dnl force debug mode for a SVN working copy
|
|
|
|
CFLAGS="-g -DGEANY_DEBUG $CFLAGS"])
|
2006-05-21 17:51:22 +00:00
|
|
|
|
2007-12-12 20:04:45 +00:00
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
# Check for binary relocation support
|
2011-10-06 00:43:28 +00:00
|
|
|
GEANY_CHECK_BINRELOC
|
2007-12-12 20:04:45 +00:00
|
|
|
|
|
|
|
|
2011-06-13 18:41:15 +00:00
|
|
|
# GTK/GLib/GIO checks
|
|
|
|
gtk_modules="gtk+-2.0 >= 2.12 glib-2.0 >= 2.16 gio-2.0 >= 2.16"
|
2011-10-06 00:42:48 +00:00
|
|
|
PKG_CHECK_MODULES([GTK], [$gtk_modules])
|
|
|
|
AC_SUBST([GTK_CFLAGS])
|
|
|
|
AC_SUBST([GTK_LIBS])
|
|
|
|
GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
|
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
|
|
|
|
2007-07-17 08:21:19 +00:00
|
|
|
# --disable-deprecated switch for GTK2 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
|
|
|
|
2007-06-26 16:17:16 +00:00
|
|
|
# Plugins support
|
2011-10-06 00:44:06 +00:00
|
|
|
GEANY_CHECK_PLUGINS
|
2007-06-26 16:17:16 +00:00
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
|
|
|
|
# check whether to use included GNU regex library
|
2011-10-06 00:43:46 +00:00
|
|
|
GEANY_CHECK_GNU_REGEX
|
2008-04-27 14:33:40 +00:00
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
|
|
|
|
# check for mingw specific settings
|
2008-02-20 12:36:59 +00:00
|
|
|
case "${host}" in
|
2011-10-06 00:42:48 +00:00
|
|
|
*mingw*)
|
|
|
|
AC_CHECK_LIB([iberty], [fnmatch], [],
|
|
|
|
[AC_MSG_ERROR([fnmatch does not present in libiberty. You need to update it, read http://www.geany.org/Support/CrossCompile for details.])])
|
|
|
|
AC_DEFINE([WIN32], [1], [we are cross compiling for WIN32])
|
|
|
|
AC_DEFINE([HAVE_SOCKET], [1], [Define if you want to detect a running instance])
|
|
|
|
AM_CONDITIONAL([MINGW], true)
|
|
|
|
want_vte="no"
|
|
|
|
want_socket="yes"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AM_CONDITIONAL([MINGW], false)
|
|
|
|
;;
|
2008-02-20 12:36:59 +00:00
|
|
|
esac
|
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
|
|
|
|
# skip check if already decided
|
2008-02-20 12:36:59 +00:00
|
|
|
if test "x$want_socket" = "x"; then
|
2011-10-06 00:42:48 +00:00
|
|
|
# socket support
|
|
|
|
AC_ARG_ENABLE([socket],
|
|
|
|
[AS_HELP_STRING([--enable-socket],
|
|
|
|
[enable if you want to detect a running instance [default=yes]])],
|
|
|
|
[want_socket="$enableval"],
|
|
|
|
[want_socket="yes"])
|
|
|
|
|
|
|
|
if test "x$want_socket" = "xyes"; then
|
|
|
|
AC_DEFINE([HAVE_SOCKET], [1], [Define if you want to detect a running instance])
|
|
|
|
# this should bring in libsocket on Solaris:
|
|
|
|
AC_SEARCH_LIBS([connect],[socket])
|
|
|
|
fi
|
2006-07-25 17:45:34 +00:00
|
|
|
fi
|
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
|
|
|
|
# skip check if already decided
|
2008-02-20 12:36:59 +00:00
|
|
|
if test "x$want_vte" = "x"; then
|
2011-10-06 00:42:48 +00:00
|
|
|
# VTE support
|
|
|
|
AC_ARG_ENABLE([vte],
|
|
|
|
[AS_HELP_STRING([--enable-vte],
|
|
|
|
[enable if you want virtual terminal support [default=yes]])],
|
|
|
|
[want_vte="$enableval"],
|
|
|
|
[want_vte="yes"])
|
|
|
|
if test "x$want_vte" = "xyes"; then
|
|
|
|
AC_DEFINE([HAVE_VTE], [1], [Define if you want VTE support])
|
|
|
|
fi
|
|
|
|
AC_ARG_WITH([vte-module-path],
|
|
|
|
[AS_HELP_STRING([--with-vte-module-path=PATH],
|
|
|
|
[Path to a loadable libvte [default=None]])],
|
|
|
|
[AC_DEFINE_UNQUOTED([VTE_MODULE_PATH],
|
|
|
|
["$withval"], [Path to a loadable libvte])])
|
2008-02-20 12:36:59 +00:00
|
|
|
fi
|
2005-12-29 20:11:07 +00:00
|
|
|
|
2007-11-17 14:04:27 +00:00
|
|
|
|
2006-05-14 16:07:30 +00:00
|
|
|
# just for a laugh (it has absolutely no effect)
|
2011-10-06 00:42:48 +00:00
|
|
|
AC_ARG_ENABLE([the-force],
|
|
|
|
[AS_HELP_STRING([--enable-the-force],
|
|
|
|
[enable if you are Luke Skywalker and the force is with you [default=no]])],
|
|
|
|
[be_luke="$enableval"],
|
|
|
|
[be_luke="no"])
|
2006-05-14 16:07:30 +00:00
|
|
|
AC_MSG_CHECKING([whether the force is with you])
|
|
|
|
if test "x$be_luke" = "xyes"; then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
|
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
|
|
|
|
2006-05-14 16:07:30 +00:00
|
|
|
|
2006-01-16 17:00:39 +00:00
|
|
|
# Set ${datadir}
|
2006-10-01 17:28:45 +00:00
|
|
|
if test "x${datadir}" = 'x${prefix}/share' -o "x${datarootdir}" = 'x${prefix}/share'; then
|
2006-01-16 17:00:39 +00:00
|
|
|
if test "x${prefix}" = "xNONE"; then
|
|
|
|
prefix=${ac_default_prefix}
|
|
|
|
fi
|
|
|
|
fi
|
2006-07-25 17:45:34 +00:00
|
|
|
|
2008-06-09 17:43:48 +00:00
|
|
|
# Set ${docdir} if it is empty
|
|
|
|
if test -z "${docdir}"; then
|
|
|
|
docdir='${datadir}/doc/${PACKAGE}'
|
2011-10-06 00:42:48 +00:00
|
|
|
AC_SUBST([docdir])
|
2008-06-09 17:43:48 +00:00
|
|
|
fi
|
|
|
|
|
2006-10-01 17:28:45 +00:00
|
|
|
GEANY_DATA_DIR=`eval echo ${datarootdir}/geany`
|
2011-10-06 00:42:48 +00:00
|
|
|
AC_SUBST([GEANY_DATA_DIR])
|
2006-01-15 18:44:38 +00:00
|
|
|
|
2006-07-25 17:45:34 +00:00
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
|
|
|
|
# Output
|
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
icons/Makefile
|
|
|
|
icons/16x16/Makefile
|
|
|
|
icons/48x48/Makefile
|
|
|
|
icons/scalable/Makefile
|
|
|
|
tagmanager/Makefile
|
|
|
|
tagmanager/include/Makefile
|
|
|
|
tagmanager/mio/Makefile
|
|
|
|
scintilla/Makefile
|
|
|
|
scintilla/include/Makefile
|
|
|
|
src/Makefile
|
|
|
|
plugins/Makefile
|
|
|
|
po/Makefile.in
|
|
|
|
doc/Makefile
|
|
|
|
doc/geany.1
|
|
|
|
geany.spec
|
|
|
|
geany.pc
|
|
|
|
doc/Doxyfile
|
2005-11-22 12:26:26 +00:00
|
|
|
])
|
2011-10-06 00:42:48 +00:00
|
|
|
AC_OUTPUT
|
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
# Summary
|
2005-11-22 12:26:26 +00:00
|
|
|
echo "----------------------------------------"
|
2005-11-27 20:44:06 +00:00
|
|
|
echo "Install Geany in : ${prefix}"
|
2011-10-06 00:42:48 +00:00
|
|
|
if test -n "${build}" -a -n "${target}"; then
|
2006-07-25 17:45:34 +00:00
|
|
|
echo "Building Geany on : ${build}"
|
|
|
|
echo "Building Geany for : ${target}"
|
|
|
|
fi
|
2006-02-14 22:17:36 +00:00
|
|
|
echo "Using GTK version : ${GTK_VERSION}"
|
2011-10-06 00:44:06 +00:00
|
|
|
echo "Build with plugin support : ${geany_enable_plugins}"
|
2005-11-27 20:44:06 +00:00
|
|
|
echo "Use virtual terminal support : ${want_vte}"
|
2006-08-30 18:36:17 +00:00
|
|
|
echo "Use (UNIX domain) socket support : ${want_socket}"
|
2010-08-25 11:44:33 +00:00
|
|
|
if test "x$enable_gnu_regex" = "xyes" ; then
|
|
|
|
echo "GNU regex library : built-in"
|
|
|
|
else
|
|
|
|
echo "GNU regex library : system"
|
|
|
|
fi
|
|
|
|
|
2011-10-06 00:42:48 +00:00
|
|
|
if test "${REVISION}" != "-1"; then
|
2006-06-04 18:13:38 +00:00
|
|
|
echo "Compiling Subversion revision : ${REVISION}"
|
|
|
|
fi
|
2006-02-14 22:17:36 +00:00
|
|
|
echo ""
|
2005-11-22 12:26:26 +00:00
|
|
|
echo "Configuration is done OK."
|
|
|
|
echo ""
|