diff options
| author | Paul Eggert | 2014-05-03 00:09:16 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-05-03 00:09:16 -0700 |
| commit | af3e4d067ace861eb50f5e78ffb8e63e6756881a (patch) | |
| tree | bca01c4aaae2635e76f6997b6c5aae60364625ba | |
| parent | 53a7da76db34b7fa8b3702760024865e46efbc78 (diff) | |
| download | emacs-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-- | ChangeLog | 8 | ||||
| -rwxr-xr-x | autogen.sh | 45 | ||||
| -rw-r--r-- | etc/PROBLEMS | 20 |
3 files changed, 60 insertions, 13 deletions
| @@ -1,3 +1,11 @@ | |||
| 1 | 2014-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 | |||
| 1 | 2014-05-02 Glenn Morris <rgm@gnu.org> | 9 | 2014-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. | |||
| 195 | If you know that the required versions are in your PATH, but this | 195 | If you know that the required versions are in your PATH, but this |
| 196 | script has made an error, then you can simply run | 196 | script has made an error, then you can simply run |
| 197 | 197 | ||
| 198 | autoreconf -i -I m4 | 198 | autoreconf -fi -I m4 |
| 199 | 199 | ||
| 200 | instead of this script. | 200 | instead of this script. |
| 201 | 201 | ||
| @@ -205,12 +205,51 @@ EOF | |||
| 205 | exit 1 | 205 | exit 1 |
| 206 | fi | 206 | fi |
| 207 | 207 | ||
| 208 | echo "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. | ||
| 211 | echo "Checking for pkg.m4..." | ||
| 212 | AUTORECONF_ENV= | ||
| 213 | ac_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 | ||
| 237 | The version of aclocal that you are using cannot find the pkg.m4 file that | ||
| 238 | pkg-config provides. If it is installed in some unusual directory /FOO/BAR, | ||
| 239 | set ACLOCAL_PATH='/FOO/BAR' in the environment and run this script again. | ||
| 240 | EOF | ||
| 241 | exit 1 | ||
| 242 | fi | ||
| 243 | } | ||
| 244 | echo ok | ||
| 245 | |||
| 246 | echo 'Your system has the required tools.' | ||
| 247 | echo "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. |
| 213 | autoreconf -f -i -I m4 || exit $? | 252 | autoreconf -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 | ||
| 1235 | When you start Emacs you may see something like this: | 1235 | When 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 | ||
| 1240 | This happens if the Emacs binary has been renamed. The cause is the Ubuntu | 1240 | This 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 | 2229 | This can happen if you installed your own automake in a non-standard |
| 2230 | of aclocal that you are using cannot find the pkg.m4 file that | 2230 | location /prefix. The simplest workaround is to run ./autogen.sh |
| 2231 | pkg-config provides. If you installed your own version of automake in | 2231 | instead. If you prefer to run autoreconf directly, then if pkg.m4 is |
| 2232 | a non-standard location /prefix, then add a line to the | 2232 | in the directory /usr/share/aclocal you can append /usr/share/local to |
| 2233 | /prefix/share/aclocal/dirlist file (create the file if necessary) | 2233 | your ACLOCAL_PATH environment variable, or you can add a line |
| 2234 | that 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). | 2235 | the file if necessary). |
| 2236 | 2236 | ||
| 2237 | ** Configuration | 2237 | ** Configuration |
| 2238 | 2238 | ||