Move various tricky configure logic to their own file
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@6007 ea778897-0a13-0410-b9d1-a72fbfd435f5master
parent
f1bce08535
commit
c955de3ffc
|
@ -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.
|
||||
|
||||
|
|
15
configure.ac
15
configure.ac
|
@ -42,6 +42,8 @@ AC_CHECK_FUNCS([gethostname ftruncate fgetpos mkstemp strerror strstr])
|
|||
|
||||
# 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 @@ fi
|
|||
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])
|
||||
|
||||
|
|
|
@ -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
|
||||
])
|
Loading…
Reference in New Issue