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
|
|
|
|
2009-12-31 15:47:25 +00:00
|
|
|
AC_INIT(configure.ac)
|
2011-01-19 19:47:35 +00:00
|
|
|
AM_INIT_AUTOMAKE(geany, 0.21)
|
2010-08-23 12:37:17 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
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])])
|
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2007-07-17 15:48:53 +00:00
|
|
|
|
|
|
|
AC_GNU_SOURCE
|
|
|
|
AC_AIX
|
|
|
|
AC_MINIX
|
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
|
2010-03-31 16:36:36 +00:00
|
|
|
which $CXX >/dev/null 2>&1
|
|
|
|
if test "x$?" != "x0"; 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
|
2007-07-17 08:21:19 +00:00
|
|
|
AC_PROG_INTLTOOL
|
2005-11-22 12:26:26 +00:00
|
|
|
|
2007-06-26 16:17:16 +00:00
|
|
|
# for plugins
|
|
|
|
AC_DISABLE_STATIC
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
LIBTOOL="$LIBTOOL --silent"
|
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
# 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
|
|
|
|
2008-07-27 18:38:21 +00:00
|
|
|
# get svn revision (try GIT first, then check for SVN)
|
|
|
|
REVISION="r0"
|
2010-03-31 16:36:36 +00:00
|
|
|
GIT=`which git 2>/dev/null`
|
2008-07-27 18:38:21 +00:00
|
|
|
if test -d ".git" -a "x${GIT}" != "x" -a -x "${GIT}"
|
|
|
|
then
|
2010-08-13 14:05:34 +00:00
|
|
|
# check for git-svn repo first - find-rev (v1.5.4.1) doesn't always fail with git-only repo
|
|
|
|
git svn info &>/dev/null
|
|
|
|
if test "x$?" == "x0"; then
|
|
|
|
REVISION=r`git svn find-rev origin/trunk 2>/dev/null ||
|
2008-07-27 18:38:21 +00:00
|
|
|
git svn find-rev trunk 2>/dev/null || git svn find-rev HEAD 2>/dev/null ||
|
|
|
|
git svn find-rev master 2>/dev/null || echo 0`
|
2010-08-13 14:05:34 +00:00
|
|
|
fi
|
2008-07-27 18:38:21 +00:00
|
|
|
fi
|
|
|
|
if test "x${REVISION}" = "xr0"
|
|
|
|
then
|
2010-03-31 16:36:36 +00:00
|
|
|
SVN=`which svn 2>/dev/null`
|
2008-07-27 18:38:21 +00:00
|
|
|
if test -d ".svn" -a "x${SVN}" != "x" -a -x "${SVN}"
|
|
|
|
then
|
|
|
|
REVISION=r`$SVN info|grep 'Last Changed Rev'|cut -d' ' -f4`
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "x${REVISION}" != "xr0"
|
2006-06-04 18:13:38 +00:00
|
|
|
then
|
2007-05-28 15:28:30 +00:00
|
|
|
# force debug mode for a SVN working copy
|
|
|
|
CFLAGS="-g -DGEANY_DEBUG $CFLAGS"
|
2006-06-04 18:13:38 +00:00
|
|
|
else
|
|
|
|
REVISION="-1"
|
|
|
|
fi
|
2006-05-21 17:51:22 +00:00
|
|
|
AC_DEFINE_UNQUOTED([REVISION], "$REVISION", [subversion revision number])
|
|
|
|
|
2007-12-12 20:04:45 +00:00
|
|
|
|
|
|
|
dnl Check for binary relocation support
|
|
|
|
dnl taken from Inkscape (Hongli Lai <h.lai@chello.nl>)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(binreloc,
|
|
|
|
[ --enable-binreloc compile with binary relocation support],
|
|
|
|
enable_binreloc=$enableval,enable_binreloc=no)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether binary relocation support should be enabled)
|
|
|
|
if test "$enable_binreloc" = "yes"; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
|
|
|
|
if test -e /proc/self/maps; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_ERROR(/proc/self/maps is not available. Binary relocation cannot be enabled.)
|
|
|
|
enable_binreloc="no"
|
|
|
|
fi
|
|
|
|
|
|
|
|
elif test "$enable_binreloc" = "auto"; then
|
|
|
|
AC_MSG_RESULT(yes when available)
|
|
|
|
AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
|
|
|
|
if test -e /proc/self/maps; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
enable_binreloc=yes
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether everything is installed to the same prefix)
|
|
|
|
if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \
|
|
|
|
"$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \
|
|
|
|
"$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc'
|
|
|
|
then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_NOTICE(Binary relocation support will be disabled.)
|
|
|
|
enable_binreloc=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
enable_binreloc=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
elif test "$enable_binreloc" = "no"; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no (unknown value "$enable_binreloc"))
|
|
|
|
enable_binreloc=no
|
|
|
|
fi
|
|
|
|
if test "$enable_binreloc" = "yes"; then
|
|
|
|
AC_DEFINE(ENABLE_BINRELOC,,[Use AutoPackage?])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2006-05-21 17:51:22 +00:00
|
|
|
# GTK checks
|
2009-01-22 20:33:21 +00:00
|
|
|
gtk_modules="gtk+-2.0 >= 2.8.0"
|
2007-10-19 14:48:19 +00:00
|
|
|
PKG_CHECK_MODULES(GTK, [$gtk_modules])
|
2007-06-26 18:08:00 +00:00
|
|
|
AC_SUBST(GTK_CFLAGS)
|
|
|
|
AC_SUBST(GTK_LIBS)
|
2009-01-09 18:21:12 +00:00
|
|
|
# GIO checks
|
|
|
|
gio_modules="gio-2.0 >= 2.16"
|
|
|
|
PKG_CHECK_MODULES(GIO, [$gio_modules], have_gio=1, have_gio=0)
|
2009-01-11 17:40:40 +00:00
|
|
|
AC_SUBST(GIO_CFLAGS)
|
|
|
|
AC_SUBST(GIO_LIBS)
|
2009-01-11 18:29:39 +00:00
|
|
|
if test $have_gio = 1 ; then
|
|
|
|
AC_DEFINE(HAVE_GIO, 1, [Whether GIO is available])
|
|
|
|
fi
|
2005-11-22 12:26:26 +00:00
|
|
|
|
2007-07-17 08:21:19 +00:00
|
|
|
# --disable-deprecated switch for GTK2 purification
|
|
|
|
AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ],
|
|
|
|
[GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
|
|
|
|
|
2007-06-26 16:17:16 +00:00
|
|
|
# Plugins support
|
2008-04-27 14:33:40 +00:00
|
|
|
AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support [default=no]])], , enable_plugins=yes)
|
2007-06-26 16:17:16 +00:00
|
|
|
|
|
|
|
if test "x$enable_plugins" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled.])
|
|
|
|
AM_CONDITIONAL(PLUGINS, true)
|
|
|
|
else
|
|
|
|
AM_CONDITIONAL(PLUGINS, false)
|
|
|
|
fi
|
|
|
|
|
2008-04-27 14:33:40 +00:00
|
|
|
# Use included GNU regex library
|
|
|
|
AC_ARG_ENABLE(gnu-regex, [AC_HELP_STRING([--enable-gnu-regex], [compile with included GNU regex library [default=no]])], , enable_gnu_regex=no)
|
|
|
|
|
2010-08-25 11:44:33 +00:00
|
|
|
# auto-enable included regex if necessary
|
|
|
|
AC_CHECK_FUNCS([regcomp], [], [enable_gnu_regex="yes"])
|
|
|
|
|
2008-04-27 14:33:40 +00:00
|
|
|
if test "x$enable_gnu_regex" = "xyes" ; then
|
|
|
|
AC_DEFINE(USE_INCLUDED_REGEX, 1, [Define if included GNU regex code should be used.])
|
2008-05-21 17:41:11 +00:00
|
|
|
AC_DEFINE(HAVE_REGCOMP, 1, [Define if you have the 'regcomp' function.])
|
2008-04-27 14:33:40 +00:00
|
|
|
AM_CONDITIONAL(USE_INCLUDED_REGEX, true)
|
|
|
|
else
|
|
|
|
AM_CONDITIONAL(USE_INCLUDED_REGEX, false)
|
|
|
|
fi
|
|
|
|
|
2008-02-20 12:36:59 +00:00
|
|
|
case "${host}" in
|
|
|
|
*mingw*)
|
2008-02-24 10:20:30 +00:00
|
|
|
AC_CHECK_LIB(iberty, fnmatch, [], [
|
2008-09-01 11:15:16 +00:00
|
|
|
AC_MSG_ERROR([fnmatch does not present in libiberty. You need to update it, read http://www.geany.org/Support/CrossCompile for details.])
|
2008-02-24 10:20:30 +00:00
|
|
|
])
|
2006-07-25 17:45:34 +00:00
|
|
|
AC_DEFINE_UNQUOTED([WIN32], 1, [we are cross compiling for WIN32])
|
|
|
|
want_vte="no"
|
2009-02-24 18:25:41 +00:00
|
|
|
want_socket="yes"
|
|
|
|
AC_DEFINE(HAVE_SOCKET, 1, [Define if you want to detect a running instance])
|
2006-07-25 17:45:34 +00:00
|
|
|
AC_EXEEXT
|
2008-02-20 12:36:59 +00:00
|
|
|
AM_CONDITIONAL(MINGW, true)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AM_CONDITIONAL(MINGW, false)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
dnl skip check if already decided
|
|
|
|
if test "x$want_socket" = "x"; then
|
|
|
|
# socket support
|
|
|
|
AC_ARG_ENABLE(socket, AC_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
|
|
|
|
|
2008-02-20 12:36:59 +00:00
|
|
|
dnl skip check if already decided
|
|
|
|
if test "x$want_vte" = "x"; then
|
|
|
|
# VTE support
|
|
|
|
AC_ARG_ENABLE(vte, AC_HELP_STRING([--enable-vte],
|
2008-04-27 14:45:36 +00:00
|
|
|
[enable if you want virtual terminal support [[default=yes]]]),
|
2008-02-20 12:36:59 +00:00
|
|
|
[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, AC_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])])
|
|
|
|
fi
|
2005-12-29 20:11:07 +00:00
|
|
|
|
2006-01-16 17:00:39 +00:00
|
|
|
GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
|
2005-11-27 20:44:06 +00:00
|
|
|
|
2007-11-17 14:04:27 +00:00
|
|
|
|
|
|
|
# GTK 2.10 printing support
|
|
|
|
$PKG_CONFIG --exists 'gtk+-2.0 >= 2.10.0'
|
|
|
|
if test "x$?" = "x0" ; then
|
|
|
|
enable_printing="yes"
|
|
|
|
else
|
|
|
|
enable_printing="no (GTK >= 2.10 necessary)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2006-05-14 16:07:30 +00:00
|
|
|
# just for a laugh (it has absolutely no effect)
|
|
|
|
AC_ARG_ENABLE(the-force, AC_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"])
|
|
|
|
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
|
|
|
|
|
|
|
|
# i18n
|
2005-11-22 12:26:26 +00:00
|
|
|
GETTEXT_PACKAGE=geany
|
|
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
|
|
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
|
|
|
|
|
2010-01-17 18:37:34 +00:00
|
|
|
if test -n "${LINGUAS}"
|
|
|
|
then
|
|
|
|
ALL_LINGUAS="${LINGUAS}"
|
|
|
|
else
|
|
|
|
if test -z "$conf_dir" ; then
|
|
|
|
conf_dir="."
|
|
|
|
fi
|
|
|
|
ALL_LINGUAS=`cd "$conf_dir/po" 2>/dev/null && ls *.po 2>/dev/null | $AWK 'BEGIN { FS="."; ORS=" " } { print $1 }'`
|
|
|
|
fi
|
2006-05-14 16:07:30 +00:00
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
AM_GLIB_GNU_GETTEXT
|
2007-11-17 14:04:27 +00:00
|
|
|
# workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845)
|
2007-10-19 14:48:19 +00:00
|
|
|
if test "x$MSGFMT" = "xno"; then
|
|
|
|
AC_MSG_ERROR([msgfmt not found. Please install the gettext package.])
|
|
|
|
fi
|
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}'
|
|
|
|
AC_SUBST(docdir)
|
|
|
|
fi
|
|
|
|
|
2006-10-01 17:28:45 +00:00
|
|
|
GEANY_DATA_DIR=`eval echo ${datarootdir}/geany`
|
2006-06-08 14:48:39 +00:00
|
|
|
AC_SUBST(GEANY_DATA_DIR)
|
2006-01-15 18:44:38 +00:00
|
|
|
|
2007-08-04 08:33:56 +00:00
|
|
|
# intltool hack to define install_sh on Debian/Ubuntu systems
|
|
|
|
if test "x$install_sh" = "x"; then
|
|
|
|
install_sh="`pwd`/install-sh"
|
|
|
|
AC_SUBST(install_sh)
|
|
|
|
fi
|
2006-07-25 17:45:34 +00:00
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
2007-07-20 16:33:16 +00:00
|
|
|
icons/Makefile
|
|
|
|
icons/16x16/Makefile
|
2009-05-26 20:45:36 +00:00
|
|
|
icons/48x48/Makefile
|
|
|
|
icons/scalable/Makefile
|
2005-11-22 12:26:26 +00:00
|
|
|
tagmanager/Makefile
|
|
|
|
tagmanager/include/Makefile
|
2011-03-05 22:40:50 +00:00
|
|
|
tagmanager/mio/Makefile
|
2005-11-22 12:26:26 +00:00
|
|
|
scintilla/Makefile
|
|
|
|
scintilla/include/Makefile
|
|
|
|
src/Makefile
|
2007-06-26 16:17:16 +00:00
|
|
|
plugins/Makefile
|
2005-11-22 12:26:26 +00:00
|
|
|
po/Makefile.in
|
|
|
|
doc/Makefile
|
2006-06-08 14:48:39 +00:00
|
|
|
doc/geany.1
|
2005-11-22 12:26:26 +00:00
|
|
|
geany.spec
|
2008-03-13 12:15:26 +00:00
|
|
|
geany.pc
|
2008-02-17 18:00:42 +00:00
|
|
|
doc/Doxyfile
|
2005-11-22 12:26:26 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
echo "----------------------------------------"
|
2005-11-27 20:44:06 +00:00
|
|
|
echo "Install Geany in : ${prefix}"
|
2006-07-25 17:45:34 +00:00
|
|
|
if test "x${build}" != "x" -a "x${target}" != "x"
|
|
|
|
then
|
|
|
|
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}"
|
2007-11-17 14:04:27 +00:00
|
|
|
echo "Build with GTK printing support : ${enable_printing}"
|
2007-06-26 16:17:16 +00:00
|
|
|
echo "Build with plugin support : ${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
|
|
|
|
|
2006-06-04 18:13:38 +00:00
|
|
|
if test "${REVISION}" != "-1"
|
|
|
|
then
|
|
|
|
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 ""
|