SF.net SVN: geany:[6007] trunk
colombanw at users.sourceforge.net
colombanw at xxxxx
Thu Oct 6 00:45:08 UTC 2011
Revision: 6007
http://geany.svn.sourceforge.net/geany/?rev=6007&view=rev
Author: colombanw
Date: 2011-10-06 00:45:08 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
Move various tricky configure logic to their own file
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Added Paths:
-----------
trunk/m4/geany-utils.m4
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-06 00:44:48 UTC (rev 6006)
+++ trunk/ChangeLog 2011-10-06 00:45:08 UTC (rev 6007)
@@ -4,7 +4,8 @@
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-mingw.m4, m4/geany-socket.m4, m4/geany-vte.m4:
+ m4/geany-mingw.m4, m4/geany-socket.m4, m4/geany-vte.m4,
+ m4/geany-utils.m4:
Extract some configure logic to separate files for better
readability.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2011-10-06 00:44:48 UTC (rev 6006)
+++ trunk/configure.ac 2011-10-06 00:45:08 UTC (rev 6007)
@@ -42,6 +42,8 @@
# autoscan end
+GEANY_PREFIX
+GEANY_DOCDIR
# check for SVN revision
GEANY_CHECK_REVISION([dnl force debug mode for a SVN working copy
@@ -107,19 +109,6 @@
GEANY_I18N
-# Set ${datadir}
-if test "x${datadir}" = 'x${prefix}/share' -o "x${datarootdir}" = 'x${prefix}/share'; then
- if test "x${prefix}" = "xNONE"; then
- prefix=${ac_default_prefix}
- fi
-fi
-
-# Set ${docdir} if it is empty
-if test -z "${docdir}"; then
- docdir='${datadir}/doc/${PACKAGE}'
- AC_SUBST([docdir])
-fi
-
GEANY_DATA_DIR=`eval echo ${datarootdir}/geany`
AC_SUBST([GEANY_DATA_DIR])
Added: trunk/m4/geany-utils.m4
===================================================================
--- trunk/m4/geany-utils.m4 (rev 0)
+++ trunk/m4/geany-utils.m4 2011-10-06 00:45:08 UTC (rev 6007)
@@ -0,0 +1,26 @@
+dnl GEANY_PREFIX
+dnl Ensures $prefix and $exec_prefix are set to something sensible
+dnl
+dnl Logic taken from Geany-Plugins' build/expansions.m4
+AC_DEFUN([GEANY_PREFIX],
+[
+ if test "x$prefix" = xNONE; then
+ prefix=$ac_default_prefix
+ fi
+
+ if test "x$exec_prefix" = xNONE; then
+ exec_prefix=$prefix
+ fi
+])
+
+dnl GEANY_DOCDIR
+dnl Ensures $docdir is set and AC_SUBSTed
+dnl
+dnl FIXME: is this really useful?
+AC_DEFUN([GEANY_DOCDIR],
+[
+ if test -z "${docdir}"; then
+ docdir='${datadir}/doc/${PACKAGE}'
+ AC_SUBST([docdir])
+ fi
+])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list