aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2014-05-03 00:09:16 -0700
committerPaul Eggert2014-05-03 00:09:16 -0700
commitaf3e4d067ace861eb50f5e78ffb8e63e6756881a (patch)
treebca01c4aaae2635e76f6997b6c5aae60364625ba
parent53a7da76db34b7fa8b3702760024865e46efbc78 (diff)
downloademacs-af3e4d067ace861eb50f5e78ffb8e63e6756881a.tar.gz
emacs-af3e4d067ace861eb50f5e78ffb8e63e6756881a.zip
Make it easier on maintainers who use their own Automake.
* autogen.sh (ACLOCAL_PATH, AUTORECONF_ENV): New vars. Set them to avoid problems when maintainers prepend their own Automake installations to their PATH. Report an error if pkg.m4 can't be found.
-rw-r--r--ChangeLog8
-rwxr-xr-xautogen.sh45
-rw-r--r--etc/PROBLEMS20
3 files changed, 60 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 648017a6dd1..23aae9e7af5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
12014-05-03 Paul Eggert <eggert@cs.ucla.edu>
2
3 Make it easier on maintainers who use their own Automake.
4 * autogen.sh (ACLOCAL_PATH, AUTORECONF_ENV): New vars.
5 Set them to avoid problems when maintainers prepend their own
6 Automake installations to their PATH. Report an error if pkg.m4
7 can't be found.
8
12014-05-02 Glenn Morris <rgm@gnu.org> 92014-05-02 Glenn Morris <rgm@gnu.org>
2 10
3 * configure.ac (PKG_CONFIG_PATH): Declare with AC_ARG_VAR. 11 * configure.ac (PKG_CONFIG_PATH): Declare with AC_ARG_VAR.
diff --git a/autogen.sh b/autogen.sh
index 84230b56016..c2a2c7af04f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -195,7 +195,7 @@ this script.
195If you know that the required versions are in your PATH, but this 195If you know that the required versions are in your PATH, but this
196script has made an error, then you can simply run 196script has made an error, then you can simply run
197 197
198autoreconf -i -I m4 198autoreconf -fi -I m4
199 199
200instead of this script. 200instead of this script.
201 201
@@ -205,12 +205,51 @@ EOF
205 exit 1 205 exit 1
206fi 206fi
207 207
208echo "Your system has the required tools, running autoreconf..." 208# If automake is installed in a nonstandard location, find the standard
209# location if possible and append it to ACLOCAL_PATH. That way, it will
210# find the pkg.m4 that is installed in the standard location.
211echo "Checking for pkg.m4..."
212AUTORECONF_ENV=
213ac_dir=`aclocal --print-ac-dir` && test -r "$ac_dir/pkg.m4" || {
214 oIFS=$IFS
215 IFS=:
216 before_first_aclocal=true
217 for dir in $PATH; do
218 if test -x "$dir/aclocal"; then
219 if $before_first_aclocal; then
220 before_first_aclocal=false
221 elif ac_dir=`"$dir/aclocal" --print-ac-dir` && test -r "$ac_dir/pkg.m4"
222 then
223 case $ACLOCAL_PATH in
224 '') ACLOCAL_PATH=$ac_dir;;
225 ?*) ACLOCAL_PATH=$ACLOCAL_PATH:$ac_dir;;
226 esac
227 export ACLOCAL_PATH
228 AUTORECONF_ENV="ACLOCAL_PATH='$ACLOCAL_PATH' "
229 break
230 fi
231 fi
232 done
233 IFS=$oIFS
234
235 if test -z "$AUTORECONF_ENV"; then
236 cat <<EOF
237The version of aclocal that you are using cannot find the pkg.m4 file that
238pkg-config provides. If it is installed in some unusual directory /FOO/BAR,
239set ACLOCAL_PATH='/FOO/BAR' in the environment and run this script again.
240EOF
241 exit 1
242 fi
243}
244echo ok
245
246echo 'Your system has the required tools.'
247echo "Running \"${AUTORECONF_ENV}autoreconf -fi -I m4\" ..."
209 248
210 249
211## Let autoreconf figure out what, if anything, needs doing. 250## Let autoreconf figure out what, if anything, needs doing.
212## Use autoreconf's -f option in case autoreconf itself has changed. 251## Use autoreconf's -f option in case autoreconf itself has changed.
213autoreconf -f -i -I m4 || exit $? 252autoreconf -fi -I m4 || exit $?
214 253
215## Create a timestamp, so that './autogen.sh; make' doesn't 254## Create a timestamp, so that './autogen.sh; make' doesn't
216## cause 'make' to needlessly run 'autoheader'. 255## cause 'make' to needlessly run 'autoheader'.
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 3d5349c2793..cf025ce4b9e 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -1234,7 +1234,7 @@ https://bugzilla.xfce.org/show_bug.cgi?id=7588 .
1234 1234
1235When you start Emacs you may see something like this: 1235When you start Emacs you may see something like this:
1236 1236
1237(emacs:2286): LIBDBUSMENU-GTK-CRITICAL **: watch_submenu: assertion 1237(emacs:2286): LIBDBUSMENU-GTK-CRITICAL **: watch_submenu: assertion
1238`GTK_IS_MENU_SHELL(menu)' failed 1238`GTK_IS_MENU_SHELL(menu)' failed
1239 1239
1240This happens if the Emacs binary has been renamed. The cause is the Ubuntu 1240This happens if the Emacs binary has been renamed. The cause is the Ubuntu
@@ -2223,16 +2223,16 @@ If you do, please send it to bug-gnu-emacs@gnu.org so we can list it here.
2223 2223
2224* Build-time problems 2224* Build-time problems
2225 2225
2226** Autogen.sh / Autoreconf 2226** Autoreconf
2227 2227
2228*** Running `autogen.sh' or `autoreconf' fails with an error of the form 2228*** autoreconf fails with "possibly undefined macro: PKG_CONFIG".
2229"possibly undefined macro: PKG_CONFIG". This indicates that the version 2229This can happen if you installed your own automake in a non-standard
2230of aclocal that you are using cannot find the pkg.m4 file that 2230location /prefix. The simplest workaround is to run ./autogen.sh
2231pkg-config provides. If you installed your own version of automake in 2231instead. If you prefer to run autoreconf directly, then if pkg.m4 is
2232a non-standard location /prefix, then add a line to the 2232in the directory /usr/share/aclocal you can append /usr/share/local to
2233/prefix/share/aclocal/dirlist file (create the file if necessary) 2233your ACLOCAL_PATH environment variable, or you can add a line
2234that gives the location of the directory that contains pkg.m4 2234"/usr/share/aclocal" to the file /prefix/share/aclocal/dirlist (create
2235(e.g. /usr/share/aclocal). 2235the file if necessary).
2236 2236
2237** Configuration 2237** Configuration
2238 2238