Revision: 6006
http://geany.svn.sourceforge.net/geany/?rev=6006&view=rev
Author: colombanw
Date: 2011-10-06 00:44:48 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
Move configure logic for MinGW, socket and VTE to their own files
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Added Paths:
-----------
trunk/m4/geany-mingw.m4
trunk/m4/geany-socket.m4
trunk/m4/geany-vte.m4
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-06 00:44:25 UTC (rev 6005)
+++ trunk/ChangeLog 2011-10-06 00:44:48 UTC (rev 6006)
@@ -3,7 +3,8 @@
* autogen.sh, configure.ac:
Modernize configure.ac a bit.
* configure.ac, m4/geany-revision.m4, m4/geany-binreloc.m4,
- m4/geany-gnu-regex.m4, m4/geany-plugins.m4, m4/geany-i18n.m4:
+ m4/geany-gnu-regex.m4, m4/geany-plugins.m4, m4/geany-i18n.m4,
+ m4/geany-mingw.m4, m4/geany-socket.m4, m4/geany-vte.m4:
Extract some configure logic to separate files for better
readability.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2011-10-06 00:44:25 UTC (rev 6005)
+++ trunk/configure.ac 2011-10-06 00:44:48 UTC (rev 6006)
@@ -80,58 +80,15 @@
# check for mingw specific settings
-case "${host}" in
- *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)
- ;;
-esac
+GEANY_CHECK_MINGW
-# skip check if already decided
-if test "x$want_socket" = "x"; then
- # 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"])
+GEANY_CHECK_SOCKET
- 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
-fi
+GEANY_CHECK_VTE
-# skip check if already decided
-if test "x$want_vte" = "x"; then
- # 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])])
-fi
-
# just for a laugh (it has absolutely no effect)
AC_ARG_ENABLE([the-force],
[AS_HELP_STRING([--enable-the-force],
@@ -201,8 +158,8 @@
fi
echo "Using GTK version : ${GTK_VERSION}"
echo "Build with plugin support : ${geany_enable_plugins}"
-echo "Use virtual terminal support : ${want_vte}"
-echo "Use (UNIX domain) socket support : ${want_socket}"
+echo "Use virtual terminal support : ${geany_enable_vte}"
+echo "Use (UNIX domain) socket support : ${geany_enable_socket}"
if test "x$enable_gnu_regex" = "xyes" ; then
echo "GNU regex library : built-in"
else
Added: trunk/m4/geany-mingw.m4
===================================================================
--- trunk/m4/geany-mingw.m4 (rev 0)
+++ trunk/m4/geany-mingw.m4 2011-10-06 00:44:48 UTC (rev 6006)
@@ -0,0 +1,20 @@
+dnl GEANY_CHECK_MINGW
+dnl Checks whether we're building for MinGW, and defines appropriate stuff
+dnl if it is the case.
+dnl Most importantly, AM_CODITIONALs MINGW
+AC_DEFUN([GEANY_CHECK_MINGW],
+[
+ case "${host}" in
+ *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])
+ GEANY_CHECK_VTE([no])
+ GEANY_CHECK_SOCKET([yes])
+ AM_CONDITIONAL([MINGW], true)
+ ;;
+ *)
+ AM_CONDITIONAL([MINGW], false)
+ ;;
+ esac
+])
Added: trunk/m4/geany-socket.m4
===================================================================
--- trunk/m4/geany-socket.m4 (rev 0)
+++ trunk/m4/geany-socket.m4 2011-10-06 00:44:48 UTC (rev 6006)
@@ -0,0 +1,42 @@
+dnl _GEANY_CHECK_SOCKET_PREREQ
+AC_DEFUN([_GEANY_CHECK_SOCKET_PREREQ],
+[
+ AC_ARG_ENABLE([socket],
+ [AS_HELP_STRING([--enable-socket],
+ [enable if you want to detect a running instance [default=yes]])],
+ [geany_enable_socket="$enableval"],
+ [geany_enable_socket="auto"])
+])
+
+dnl GEANY_CHECK_SOCKET([enable])
+AC_DEFUN([GEANY_CHECK_SOCKET],
+[
+ AC_REQUIRE([_GEANY_CHECK_SOCKET_PREREQ])
+
+ dnl this way of calling once is a bit ugly, but we need to be able to
+ dnl call this from one or more locations, the first one maybe in a shell
+ dnl conditional.
+ if test "x$_geany_enable_socket_done" = x; then
+ dnl This one gives precedence for user choice
+ dnl if test "x$geany_enable_socket" = xauto; then
+ dnl if test -n "$1"; then
+ dnl geany_enable_socket="$1"
+ dnl else
+ dnl geany_enable_socket=yes
+ dnl fi
+ dnl fi
+ if test -n "$1"; then
+ geany_enable_socket="$1"
+ elif test "x$geany_enable_socket" = xauto; then
+ geany_enable_socket=yes
+ fi
+
+ if test "x$geany_enable_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
+
+ _geany_enable_socket_done=yes
+ fi
+])
Added: trunk/m4/geany-vte.m4
===================================================================
--- trunk/m4/geany-vte.m4 (rev 0)
+++ trunk/m4/geany-vte.m4 2011-10-06 00:44:48 UTC (rev 6006)
@@ -0,0 +1,46 @@
+dnl _GEANY_CHECK_VTE_PREREQ
+AC_DEFUN([_GEANY_CHECK_VTE_PREREQ],
+[
+ AC_ARG_ENABLE([vte],
+ [AS_HELP_STRING([--enable-vte],
+ [enable if you want virtual terminal support [default=yes]])],
+ [geany_enable_vte="$enableval"],
+ [geany_enable_vte="yes"])
+ 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])])
+])
+
+dnl GEANY_CHECK_VTE([enable])
+AC_DEFUN([GEANY_CHECK_VTE],
+[
+ AC_REQUIRE([_GEANY_CHECK_VTE_PREREQ])
+
+ dnl this way of calling once is a bit ugly, but we need to be able to
+ dnl call this from one or more locations, the first one maybe in a shell
+ dnl conditional.
+ dnl see geany-socket.m4
+ if test "x$_geany_enable_vte_done" = x; then
+ dnl This one gives precedence for user choice
+ dnl if test "x$geany_enable_vte" = xauto; then
+ dnl if test -n "$1"; then
+ dnl geany_enable_vte="$1"
+ dnl else
+ dnl geany_enable_vte=yes
+ dnl fi
+ dnl fi
+ if test -n "$1"; then
+ geany_enable_vte="$1"
+ elif test "x$geany_enable_vte" = xauto; then
+ geany_enable_vte=yes
+ fi
+
+ if test "x$geany_enable_vte" = xyes; then
+ AC_DEFINE([HAVE_VTE], [1], [Define if you want VTE support])
+ fi
+
+ _geany_enable_vte_done=yes
+ fi
+])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6003
http://geany.svn.sourceforge.net/geany/?rev=6003&view=rev
Author: colombanw
Date: 2011-10-06 00:43:46 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
Move configure logic for internal GNU regex usage to its own file
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Added Paths:
-----------
trunk/m4/geany-gnu-regex.m4
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-06 00:43:28 UTC (rev 6002)
+++ trunk/ChangeLog 2011-10-06 00:43:46 UTC (rev 6003)
@@ -2,7 +2,8 @@
* autogen.sh, configure.ac:
Modernize configure.ac a bit.
- * configure.ac, m4/geany-revision.m4, m4/geany-binreloc.m4:
+ * configure.ac, m4/geany-revision.m4, m4/geany-binreloc.m4,
+ m4/geany-gnu-regex.m4:
Extract some configure logic to separate files for better
readability.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2011-10-06 00:43:28 UTC (rev 6002)
+++ trunk/configure.ac 2011-10-06 00:43:46 UTC (rev 6003)
@@ -92,25 +92,9 @@
# check whether to use included GNU regex library
-AC_ARG_ENABLE([gnu-regex],
- [AS_HELP_STRING([--enable-gnu-regex],
- [compile with included GNU regex library [default=no]])],
- ,
- [enable_gnu_regex=no])
+GEANY_CHECK_GNU_REGEX
-# auto-enable included regex if necessary
-# FIXME: this may override a user choice
-AC_CHECK_FUNCS([regcomp], [], [enable_gnu_regex="yes"])
-if test "x$enable_gnu_regex" = "xyes" ; then
- AC_DEFINE([USE_INCLUDED_REGEX], [1], [Define if included GNU regex code should be used.])
- AC_DEFINE([HAVE_REGCOMP], [1], [Define if you have the 'regcomp' function.])
- AM_CONDITIONAL([USE_INCLUDED_REGEX], true)
-else
- AM_CONDITIONAL([USE_INCLUDED_REGEX], false)
-fi
-
-
# check for mingw specific settings
case "${host}" in
*mingw*)
Added: trunk/m4/geany-gnu-regex.m4
===================================================================
--- trunk/m4/geany-gnu-regex.m4 (rev 0)
+++ trunk/m4/geany-gnu-regex.m4 2011-10-06 00:43:46 UTC (rev 6003)
@@ -0,0 +1,24 @@
+dnl GEANY_CHECK_GNU_REGEX
+dnl Checks whether to use internal GNU regex library
+dnl Defines USE_INCLUDED_REGEX both with AC_DEFINE and as an
+dnl AM_CONDITIONAL
+AC_DEFUN([GEANY_CHECK_GNU_REGEX],
+[
+ AC_ARG_ENABLE([gnu-regex],
+ [AS_HELP_STRING([--enable-gnu-regex],
+ [compile with included GNU regex library [default=no]])],
+ ,
+ [enable_gnu_regex=no])
+
+ # auto-enable included regex if necessary
+ # FIXME: this may override a user choice
+ AC_CHECK_FUNCS([regcomp], [], [enable_gnu_regex="yes"])
+
+ if test "x$enable_gnu_regex" = "xyes" ; then
+ AC_DEFINE([USE_INCLUDED_REGEX], [1], [Define if included GNU regex code should be used.])
+ AC_DEFINE([HAVE_REGCOMP], [1], [Define if you have the 'regcomp' function.])
+ AM_CONDITIONAL([USE_INCLUDED_REGEX], true)
+ else
+ AM_CONDITIONAL([USE_INCLUDED_REGEX], false)
+ fi
+])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6002
http://geany.svn.sourceforge.net/geany/?rev=6002&view=rev
Author: colombanw
Date: 2011-10-06 00:43:28 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
Move configure logic for binary relocation support to its own file
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Added Paths:
-----------
trunk/m4/geany-binreloc.m4
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-06 00:43:09 UTC (rev 6001)
+++ trunk/ChangeLog 2011-10-06 00:43:28 UTC (rev 6002)
@@ -2,8 +2,8 @@
* autogen.sh, configure.ac:
Modernize configure.ac a bit.
- * configure.ac, m4/geany-revision.m4:
- Extract some configure logic to a separate file for better
+ * configure.ac, m4/geany-revision.m4, m4/geany-binreloc.m4:
+ Extract some configure logic to separate files for better
readability.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2011-10-06 00:43:09 UTC (rev 6001)
+++ trunk/configure.ac 2011-10-06 00:43:28 UTC (rev 6002)
@@ -55,60 +55,9 @@
# Check for binary relocation support
-# taken from Inkscape (Hongli Lai <h.lai(a)chello.nl>)
-AC_ARG_ENABLE([binreloc],
- [AS_HELP_STRING([--enable-binreloc],
- [compile with binary relocation support [default=no]])],
- [enable_binreloc=$enableval],
- [enable_binreloc=no])
+GEANY_CHECK_BINRELOC
-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
-
-
# GTK/GLib/GIO checks
gtk_modules="gtk+-2.0 >= 2.12 glib-2.0 >= 2.16 gio-2.0 >= 2.16"
PKG_CHECK_MODULES([GTK], [$gtk_modules])
Added: trunk/m4/geany-binreloc.m4
===================================================================
--- trunk/m4/geany-binreloc.m4 (rev 0)
+++ trunk/m4/geany-binreloc.m4 2011-10-06 00:43:28 UTC (rev 6002)
@@ -0,0 +1,58 @@
+dnl GEANY_CHECK_BINRELOC
+dnl Check for binary relocation support
+dnl
+dnl logic taken from Inkscape (Hongli Lai <h.lai(a)chello.nl>)
+AC_DEFUN([GEANY_CHECK_BINRELOC],
+[
+ AC_ARG_ENABLE([binreloc],
+ [AS_HELP_STRING([--enable-binreloc],
+ [compile with binary relocation support [default=no]])],
+ [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
+])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6000
http://geany.svn.sourceforge.net/geany/?rev=6000&view=rev
Author: colombanw
Date: 2011-10-06 00:42:48 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
Modernize configure.ac a bit
Modified Paths:
--------------
trunk/ChangeLog
trunk/autogen.sh
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-05 15:59:26 UTC (rev 5999)
+++ trunk/ChangeLog 2011-10-06 00:42:48 UTC (rev 6000)
@@ -1,3 +1,9 @@
+2011-10-06 Colomban Wendling <colomban(at)geany(dot)org>
+
+ * autogen.sh, configure.ac:
+ Modernize configure.ac a bit.
+
+
2011-10-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* tagmanager/lregex.c, tagmanager/php.c:
Modified: trunk/autogen.sh
===================================================================
--- trunk/autogen.sh 2011-10-05 15:59:26 UTC (rev 5999)
+++ trunk/autogen.sh 2011-10-06 00:42:48 UTC (rev 6000)
@@ -83,6 +83,7 @@
echo "Processing configure.ac"
+test -d build-aux || mkdir build-aux
echo "no" | glib-gettextize --force --copy
intltoolize --copy --force --automake
libtoolize --copy --force || glibtoolize --copy --force
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2011-10-05 15:59:26 UTC (rev 5999)
+++ trunk/configure.ac 2011-10-06 00:42:48 UTC (rev 6000)
@@ -1,25 +1,26 @@
dnl Process this file with autoconf to produce a configure script.
dnl $Id$
-AC_INIT(configure.ac)
-AM_INIT_AUTOMAKE(geany, 1.22)
+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])
AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE
+AC_CONFIG_HEADERS([config.h])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-AM_CONFIG_HEADER(config.h)
+# why do we use this?
+AC_USE_SYSTEM_EXTENSIONS
-AC_GNU_SOURCE
-AC_AIX
-AC_MINIX
-
AC_PROG_CC
AC_PROG_CXX
# check for C++ compiler explicitly and fail if none is found, do this check
# after AC_PROG_CXX has set the CXX environment variable
-which $CXX >/dev/null 2>&1
-if test "x$?" != "x0"; then
+if ! which $CXX >/dev/null 2>&1; then
AC_MSG_ERROR([No C++ compiler found. Please install a C++ compiler.])
fi
@@ -48,8 +49,11 @@
# autoscan end
-# get svn revision (try GIT first, then check for SVN)
+# check for SVN revision
REVISION="r0"
+
+AC_MSG_CHECKING([for SVN revision])
+# try Git first
GIT=`which git 2>/dev/null`
if test -d ".git" -a "x${GIT}" != "x" -a -x "${GIT}"
then
@@ -57,10 +61,13 @@
git svn info &>/dev/null
if test "x$?" == "x0"; then
REVISION=r`git svn find-rev origin/trunk 2>/dev/null ||
- 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`
+ 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`
fi
fi
+# then check for SVN
if test "x${REVISION}" = "xr0"
then
SVN=`which svn 2>/dev/null`
@@ -73,155 +80,181 @@
then
# force debug mode for a SVN working copy
CFLAGS="-g -DGEANY_DEBUG $CFLAGS"
+ AC_MSG_RESULT([$REVISION])
else
REVISION="-1"
+ AC_MSG_RESULT([none])
fi
AC_DEFINE_UNQUOTED([REVISION], "$REVISION", [subversion revision number])
-dnl Check for binary relocation support
-dnl taken from Inkscape (Hongli Lai <h.lai(a)chello.nl>)
+# Check for binary relocation support
+# taken from Inkscape (Hongli Lai <h.lai(a)chello.nl>)
+AC_ARG_ENABLE([binreloc],
+ [AS_HELP_STRING([--enable-binreloc],
+ [compile with binary relocation support [default=no]])],
+ [enable_binreloc=$enableval],
+ [enable_binreloc=no])
-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)
+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
+ 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_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
+ 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
+ else
+ AC_MSG_RESULT([no])
+ enable_binreloc=no
+ fi
elif test "$enable_binreloc" = "no"; then
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([no])
else
- AC_MSG_RESULT(no (unknown value "$enable_binreloc"))
- enable_binreloc=no
+ AC_MSG_RESULT([no (unknown value "$enable_binreloc")])
+ enable_binreloc=no
fi
if test "$enable_binreloc" = "yes"; then
- AC_DEFINE(ENABLE_BINRELOC,,[Use AutoPackage?])
+ AC_DEFINE([ENABLE_BINRELOC],,[Use AutoPackage?])
fi
# GTK/GLib/GIO checks
gtk_modules="gtk+-2.0 >= 2.12 glib-2.0 >= 2.16 gio-2.0 >= 2.16"
-PKG_CHECK_MODULES(GTK, [$gtk_modules])
-AC_SUBST(GTK_CFLAGS)
-AC_SUBST(GTK_LIBS)
+PKG_CHECK_MODULES([GTK], [$gtk_modules])
+AC_SUBST([GTK_CFLAGS])
+AC_SUBST([GTK_LIBS])
+GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
# GTHREAD checks
gthread_modules="gthread-2.0"
-PKG_CHECK_MODULES(GTHREAD, [$gthread_modules])
-AC_SUBST(GTHREAD_CFLAGS)
-AC_SUBST(GTHREAD_LIBS)
+PKG_CHECK_MODULES([GTHREAD], [$gthread_modules])
+AC_SUBST([GTHREAD_CFLAGS])
+AC_SUBST([GTHREAD_LIBS])
# --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"], [])
+AC_ARG_ENABLE([deprecated],
+ [AS_HELP_STRING([--disable-deprecated], [Disable deprecated GTK functions.])],
+ [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"],
+ [])
+
# Plugins support
-AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support [default=no]])], , enable_plugins=yes)
+AC_ARG_ENABLE([plugins],
+ [AS_HELP_STRING([--disable-plugins], [compile without plugin support [default=no]])],
+ ,
+ [enable_plugins=yes])
if test "x$enable_plugins" = "xyes" ; then
- AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled.])
- AM_CONDITIONAL(PLUGINS, true)
+ AC_DEFINE([HAVE_PLUGINS], [1], [Define if plugins are enabled.])
+ AM_CONDITIONAL([PLUGINS], true)
else
- AM_CONDITIONAL(PLUGINS, false)
+ AM_CONDITIONAL([PLUGINS], false)
fi
-# 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)
+# check whether to use included GNU regex library
+AC_ARG_ENABLE([gnu-regex],
+ [AS_HELP_STRING([--enable-gnu-regex],
+ [compile with included GNU regex library [default=no]])],
+ ,
+ [enable_gnu_regex=no])
+
# auto-enable included regex if necessary
+# FIXME: this may override a user choice
AC_CHECK_FUNCS([regcomp], [], [enable_gnu_regex="yes"])
if test "x$enable_gnu_regex" = "xyes" ; then
- AC_DEFINE(USE_INCLUDED_REGEX, 1, [Define if included GNU regex code should be used.])
- AC_DEFINE(HAVE_REGCOMP, 1, [Define if you have the 'regcomp' function.])
- AM_CONDITIONAL(USE_INCLUDED_REGEX, true)
+ AC_DEFINE([USE_INCLUDED_REGEX], [1], [Define if included GNU regex code should be used.])
+ AC_DEFINE([HAVE_REGCOMP], [1], [Define if you have the 'regcomp' function.])
+ AM_CONDITIONAL([USE_INCLUDED_REGEX], true)
else
- AM_CONDITIONAL(USE_INCLUDED_REGEX, false)
+ AM_CONDITIONAL([USE_INCLUDED_REGEX], false)
fi
+
+# check for mingw specific settings
case "${host}" in
- *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_UNQUOTED([WIN32], 1, [we are cross compiling for WIN32])
- want_vte="no"
- want_socket="yes"
- AC_DEFINE(HAVE_SOCKET, 1, [Define if you want to detect a running instance])
- AC_EXEEXT
- AM_CONDITIONAL(MINGW, true)
- ;;
- *)
- AM_CONDITIONAL(MINGW, false)
- ;;
+ *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)
+ ;;
esac
-dnl skip check if already decided
+
+# 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"])
+ # 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
+ 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
fi
-dnl skip check if already decided
+
+# skip check if already decided
if test "x$want_vte" = "x"; then
- # VTE support
- AC_ARG_ENABLE(vte, AC_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, 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])])
+ # 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])])
fi
-GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
-
# 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_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"])
AC_MSG_CHECKING([whether the force is with you])
if test "x$be_luke" = "xyes"; then
AC_MSG_RESULT([yes])
@@ -229,16 +262,16 @@
AC_MSG_RESULT([no])
fi
+
# i18n
-GETTEXT_PACKAGE=geany
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
+GETTEXT_PACKAGE="$PACKAGE"
+AC_SUBST([GETTEXT_PACKAGE])
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package.])
-if test -n "${LINGUAS}"
-then
+if test -n "${LINGUAS}"; then
ALL_LINGUAS="${LINGUAS}"
else
- if test -z "$conf_dir" ; then
+ 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 }'`
@@ -261,43 +294,47 @@
# Set ${docdir} if it is empty
if test -z "${docdir}"; then
docdir='${datadir}/doc/${PACKAGE}'
- AC_SUBST(docdir)
+ AC_SUBST([docdir])
fi
GEANY_DATA_DIR=`eval echo ${datarootdir}/geany`
-AC_SUBST(GEANY_DATA_DIR)
+AC_SUBST([GEANY_DATA_DIR])
# 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)
+ AC_SUBST([install_sh])
fi
-AC_OUTPUT([
-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
+
+# 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
])
+AC_OUTPUT
+
+# Summary
echo "----------------------------------------"
echo "Install Geany in : ${prefix}"
-if test "x${build}" != "x" -a "x${target}" != "x"
-then
+if test -n "${build}" -a -n "${target}"; then
echo "Building Geany on : ${build}"
echo "Building Geany for : ${target}"
fi
@@ -311,8 +348,7 @@
echo "GNU regex library : system"
fi
-if test "${REVISION}" != "-1"
-then
+if test "${REVISION}" != "-1"; then
echo "Compiling Subversion revision : ${REVISION}"
fi
echo ""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5999
http://geany.svn.sourceforge.net/geany/?rev=5999&view=rev
Author: ntrel
Date: 2011-10-05 15:59:26 +0000 (Wed, 05 Oct 2011)
Log Message:
-----------
Use <geanyplugin.h> not "geanyplugin.h" in the howto.
Modified Paths:
--------------
trunk/doc/plugins.dox
Modified: trunk/doc/plugins.dox
===================================================================
--- trunk/doc/plugins.dox 2011-10-05 15:33:40 UTC (rev 5998)
+++ trunk/doc/plugins.dox 2011-10-05 15:59:26 UTC (rev 5999)
@@ -184,7 +184,7 @@
*
* Let's start with the very basic headers and add more later if necessary.
* @code
-#include "geanyplugin.h"
+#include <geanyplugin.h>
* @endcode
*
* @a geanyplugin.h includes all of the Geany API and also the necessary GTK header files,
@@ -343,7 +343,7 @@
* @section listing Complete listing (without comments)
*
* @code
-#include "geanyplugin.h"
+#include <geanyplugin.h>
GeanyPlugin *geany_plugin;
GeanyData *geany_data;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5998
http://geany.svn.sourceforge.net/geany/?rev=5998&view=rev
Author: ntrel
Date: 2011-10-05 15:33:40 +0000 (Wed, 05 Oct 2011)
Log Message:
-----------
Fix argument description.
Modified Paths:
--------------
trunk/src/utils.c
Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c 2011-10-05 12:00:38 UTC (rev 5997)
+++ trunk/src/utils.c 2011-10-05 15:33:40 UTC (rev 5998)
@@ -1530,7 +1530,7 @@
/* Replaces @len characters from offset @a pos.
- * len can be -1 for str->len.
+ * len can be -1 to replace the remainder of @a str.
* returns: pos + strlen(replace). */
gint utils_string_replace(GString *str, gint pos, gint len, const gchar *replace)
{
@@ -1540,7 +1540,6 @@
g_string_insert(str, pos, replace);
pos += strlen(replace);
}
-
return pos;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5997
http://geany.svn.sourceforge.net/geany/?rev=5997&view=rev
Author: ntrel
Date: 2011-10-05 12:00:38 +0000 (Wed, 05 Oct 2011)
Log Message:
-----------
Fix CTags bug 2970274 - when using addCallbackRegex the callback
receives less than the number of matches. The number is still not
correct (due to POSIX regex compatibility) but at least includes
all non-empty matches now.
http://sourceforge.net/tracker/index.php?func=detail&aid=2970274
&group_id=6556&atid=106556
Modified Paths:
--------------
trunk/ChangeLog
trunk/tagmanager/lregex.c
trunk/tagmanager/php.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-04 17:10:42 UTC (rev 5996)
+++ trunk/ChangeLog 2011-10-05 12:00:38 UTC (rev 5997)
@@ -1,3 +1,14 @@
+2011-10-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * tagmanager/lregex.c, tagmanager/php.c:
+ Fix CTags bug 2970274 - when using addCallbackRegex the callback
+ receives less than the number of matches. The number is still not
+ correct (due to POSIX regex compatibility) but at least includes
+ all non-empty matches now.
+ http://sourceforge.net/tracker/index.php?func=detail&aid=2970274
+ &group_id=6556&atid=106556
+
+
2011-10-04 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* tagmanager/js.c:
Modified: trunk/tagmanager/lregex.c
===================================================================
--- trunk/tagmanager/lregex.c 2011-10-04 17:10:42 UTC (rev 5996)
+++ trunk/tagmanager/lregex.c 2011-10-05 12:00:38 UTC (rev 5997)
@@ -471,11 +471,16 @@
for (i = 0 ; i < BACK_REFERENCE_COUNT ; ++i)
{
int so, eo;
- if (!g_match_info_fetch_pos(minfo, i, &so, &eo) || so == -1)
+ if (!g_match_info_fetch_pos(minfo, i, &so, &eo))
break;
matches [i].start = so;
matches [i].length = eo - so;
- ++count;
+ /* a valid match may have both offsets == -1,
+ * e.g. (foo)*(bar) matching "bar" - see CTags bug 2970274.
+ * As POSIX regex doesn't seem to have a way to count matches,
+ * we return the count up to the last non-empty match. */
+ if (so != -1)
+ count = i + 1;
}
patbuf->u.callback.function (vStringValue (line), matches, count);
}
Modified: trunk/tagmanager/php.c
===================================================================
--- trunk/tagmanager/php.c 2011-10-04 17:10:42 UTC (rev 5996)
+++ trunk/tagmanager/php.c 2011-10-05 12:00:38 UTC (rev 5997)
@@ -80,13 +80,8 @@
addTagRegex(language, "^[ \t]*const[ \t]*([" ALPHA "_][" ALNUM "_]*)[ \t]*[=;]",
"\\1", "m,macro,macros", NULL);
addCallbackRegex(language,
- "^[ \t]*((public|protected|private|static|final)[ \t]+)+function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)[[:space:]]*(\\(.*\\))",
+ "^[ \t]*((public|protected|private|static|final)[ \t]+)*function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)[[:space:]]*(\\(.*\\))",
NULL, function_cb);
- /* note: using (qualifiers)* instead of (qualifiers)+ in the above regex doesn't seem to
- * match 'function' on its own, so we handle that separately: */
- addCallbackRegex(language,
- "^[ \t]*function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)[[:space:]]*(\\(.*\\))",
- NULL, function_cb);
addTagRegex(language, "^[ \t]*(\\$|::\\$|\\$this->)([" ALPHA "_][" ALNUM "_]*)[ \t]*=",
"\\2", "v,variable,variables", NULL);
addTagRegex(language, "^[ \t]*((var|public|protected|private|static)[ \t]+)+\\$([" ALPHA "_][" ALNUM "_]*)[ \t]*[=;]",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.