diff options
| author | Paul Eggert | 2012-12-08 18:22:39 -0800 |
|---|---|---|
| committer | Paul Eggert | 2012-12-08 18:22:39 -0800 |
| commit | 3cc53d60248e48c971a0e78d11bc7cf8c2b02fe2 (patch) | |
| tree | a692610088d165c54bfbd5962a252e2fb2e06a8d | |
| parent | c6c08d3f8fe4d2c9e588189e46d60a30ef3e8d20 (diff) | |
| download | emacs-3cc53d60248e48c971a0e78d11bc7cf8c2b02fe2.tar.gz emacs-3cc53d60248e48c971a0e78d11bc7cf8c2b02fe2.zip | |
Allow spaces in some configuration vars (Bug#13078).
* configure.ac (srcdir): Don't assume $PWD lacks spaces.
(srcdir, MAKEINFO, PKG_CONFIG, PKG_CONFIG_MIN_VERSION):
All uses quoted, to allow spaces in these vars.
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | configure.ac | 53 |
2 files changed, 36 insertions, 24 deletions
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-12-09 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Allow spaces in some configuration vars (Bug#13078). | ||
| 4 | * configure.ac (srcdir): Don't assume $PWD lacks spaces. | ||
| 5 | (srcdir, MAKEINFO, PKG_CONFIG, PKG_CONFIG_MIN_VERSION): | ||
| 6 | All uses quoted, to allow spaces in these vars. | ||
| 7 | |||
| 1 | 2012-12-08 Paul Eggert <eggert@cs.ucla.edu> | 8 | 2012-12-08 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 9 | ||
| 3 | Use putenv+unsetenv instead of modifying environ directly (Bug#13070). | 10 | Use putenv+unsetenv instead of modifying environ directly (Bug#13070). |
diff --git a/configure.ac b/configure.ac index affbf5f750d..ea97874da0d 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -130,7 +130,7 @@ OPTION_DEFAULT_ON([sound],[don't compile with sound support]) | |||
| 130 | 130 | ||
| 131 | dnl FIXME currently it is not the last. | 131 | dnl FIXME currently it is not the last. |
| 132 | dnl This should be the last --with option, because --with-x is | 132 | dnl This should be the last --with option, because --with-x is |
| 133 | dnl added later on when we find the path of X, and it's best to | 133 | dnl added later on when we find the file name of X, and it's best to |
| 134 | dnl keep them together visually. | 134 | dnl keep them together visually. |
| 135 | AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT], | 135 | AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT], |
| 136 | [use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, motif, no)])], | 136 | [use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, motif, no)])], |
| @@ -205,8 +205,8 @@ fi | |||
| 205 | AC_SUBST(GZIP_INFO) | 205 | AC_SUBST(GZIP_INFO) |
| 206 | 206 | ||
| 207 | AC_ARG_WITH([pkg-config-prog],dnl | 207 | AC_ARG_WITH([pkg-config-prog],dnl |
| 208 | [AS_HELP_STRING([--with-pkg-config-prog=PATH], | 208 | [AS_HELP_STRING([--with-pkg-config-prog=FILENAME], |
| 209 | [path to pkg-config for finding GTK and librsvg])]) | 209 | [file name of pkg-config for finding GTK and librsvg])]) |
| 210 | if test "X${with_pkg_config_prog}" != X; then | 210 | if test "X${with_pkg_config_prog}" != X; then |
| 211 | if test "${with_pkg_config_prog}" != yes; then | 211 | if test "${with_pkg_config_prog}" != yes; then |
| 212 | PKG_CONFIG="${with_pkg_config_prog}" | 212 | PKG_CONFIG="${with_pkg_config_prog}" |
| @@ -226,7 +226,8 @@ test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ | |||
| 226 | test "X$gameuser" = X && gameuser=games | 226 | test "X$gameuser" = X && gameuser=games |
| 227 | 227 | ||
| 228 | AC_ARG_WITH([gnustep-conf],dnl | 228 | AC_ARG_WITH([gnustep-conf],dnl |
| 229 | [AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])]) | 229 | [AS_HELP_STRING([--with-gnustep-conf=FILENAME], |
| 230 | [name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])]) | ||
| 230 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ | 231 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ |
| 231 | GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" | 232 | GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" |
| 232 | test "X$GNUSTEP_CONFIG_FILE" = "X" && \ | 233 | test "X$GNUSTEP_CONFIG_FILE" = "X" && \ |
| @@ -354,7 +355,7 @@ AC_ARG_ENABLE(autodepend, | |||
| 354 | [ac_enable_autodepend="${enableval}"],[ac_enable_autodepend=yes]) | 355 | [ac_enable_autodepend="${enableval}"],[ac_enable_autodepend=yes]) |
| 355 | 356 | ||
| 356 | #### Make srcdir absolute, if it isn't already. It's important to | 357 | #### Make srcdir absolute, if it isn't already. It's important to |
| 357 | #### avoid running the path through pwd unnecessarily, since pwd can | 358 | #### avoid running the file name through pwd unnecessarily, since pwd can |
| 358 | #### give you automounter prefixes, which can go away. We do all this | 359 | #### give you automounter prefixes, which can go away. We do all this |
| 359 | #### so Emacs can find its files when run uninstalled. | 360 | #### so Emacs can find its files when run uninstalled. |
| 360 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | 361 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). |
| @@ -364,17 +365,17 @@ case "${srcdir}" in | |||
| 364 | . ) | 365 | . ) |
| 365 | ## We may be able to use the $PWD environment variable to make this | 366 | ## We may be able to use the $PWD environment variable to make this |
| 366 | ## absolute. But sometimes PWD is inaccurate. | 367 | ## absolute. But sometimes PWD is inaccurate. |
| 367 | ## Note: we used to use ${PWD} at the end instead of `pwd`, | 368 | ## Note: we used to use $PWD at the end instead of `pwd`, |
| 368 | ## but that tested only for a well-formed and valid PWD, | 369 | ## but that tested only for a well-formed and valid PWD, |
| 369 | ## it did not object when PWD was well-formed and valid but just wrong. | 370 | ## it did not object when PWD was well-formed and valid but just wrong. |
| 370 | if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ; | 371 | if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ; |
| 371 | then | 372 | then |
| 372 | srcdir="$PWD" | 373 | srcdir="$PWD" |
| 373 | else | 374 | else |
| 374 | srcdir="`(cd ${srcdir}; pwd)`" | 375 | srcdir=`(cd "$srcdir"; pwd)` |
| 375 | fi | 376 | fi |
| 376 | ;; | 377 | ;; |
| 377 | * ) srcdir="`(cd ${srcdir}; pwd)`" ;; | 378 | * ) srcdir=`(cd "$srcdir"; pwd)` ;; |
| 378 | esac | 379 | esac |
| 379 | 380 | ||
| 380 | ### Canonicalize the configuration name. | 381 | ### Canonicalize the configuration name. |
| @@ -810,9 +811,13 @@ fi | |||
| 810 | AC_PATH_PROG(MAKEINFO, makeinfo, no) | 811 | AC_PATH_PROG(MAKEINFO, makeinfo, no) |
| 811 | dnl By this stage, configure has already checked for egrep and set EGREP, | 812 | dnl By this stage, configure has already checked for egrep and set EGREP, |
| 812 | dnl or exited with an error if no egrep was found. | 813 | dnl or exited with an error if no egrep was found. |
| 813 | if test "$MAKEINFO" != "no" && \ | 814 | if test "$MAKEINFO" != "no"; then |
| 814 | test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[[^0-9]]*([[1-4]][[0-9]]+|[[5-9]]|4\.[[7-9]]|4\.[[1-6]][[0-9]]+)'`" = x; then | 815 | case ` |
| 815 | MAKEINFO=no | 816 | "$MAKEINFO" --version 2> /dev/null | |
| 817 | $EGREP 'texinfo[[^0-9]]*([[1-4]][[0-9]]+|[[5-9]]|4\.[[7-9]]|4\.[[1-6]][[0-9]]+)' | ||
| 818 | ` in | ||
| 819 | '') MAKEINFO=no;; | ||
| 820 | esac | ||
| 816 | fi | 821 | fi |
| 817 | 822 | ||
| 818 | ## Makeinfo is unusual. For a released Emacs, the manuals are | 823 | ## Makeinfo is unusual. For a released Emacs, the manuals are |
| @@ -830,7 +835,7 @@ if test "$MAKEINFO" = "no"; then | |||
| 830 | MAKEINFO=makeinfo | 835 | MAKEINFO=makeinfo |
| 831 | if test "x${with_makeinfo}" = "xno"; then | 836 | if test "x${with_makeinfo}" = "xno"; then |
| 832 | HAVE_MAKEINFO=no | 837 | HAVE_MAKEINFO=no |
| 833 | elif test ! -e $srcdir/info/emacs && test ! -e $srcdir/info/emacs.info; then | 838 | elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then |
| 834 | AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.7, and your | 839 | AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.7, and your |
| 835 | source tree does not seem to have pre-built manuals in the `info' directory. | 840 | source tree does not seem to have pre-built manuals in the `info' directory. |
| 836 | Either install a suitable version of makeinfo, or re-run configure | 841 | Either install a suitable version of makeinfo, or re-run configure |
| @@ -1186,15 +1191,15 @@ AC_DEFUN([PKG_CHECK_MODULES], [ | |||
| 1186 | 1191 | ||
| 1187 | if test "$PKG_CONFIG" = "no" ; then | 1192 | if test "$PKG_CONFIG" = "no" ; then |
| 1188 | ifelse([$4], , [AC_MSG_ERROR([ | 1193 | ifelse([$4], , [AC_MSG_ERROR([ |
| 1189 | *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.])], [$4]) | 1194 | *** The pkg-config script could not be found. Make sure it is in your path, or give the full name of pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.])], [$4]) |
| 1190 | else | 1195 | else |
| 1191 | PKG_CONFIG_MIN_VERSION=0.9.0 | 1196 | PKG_CONFIG_MIN_VERSION=0.9.0 |
| 1192 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | 1197 | if "$PKG_CONFIG" --atleast-pkgconfig-version "$PKG_CONFIG_MIN_VERSION"; then |
| 1193 | AC_MSG_CHECKING(for $2) | 1198 | AC_MSG_CHECKING(for $2) |
| 1194 | 1199 | ||
| 1195 | if $PKG_CONFIG --exists "$2" 2>&AS_MESSAGE_LOG_FD && | 1200 | if "$PKG_CONFIG" --exists "$2" 2>&AS_MESSAGE_LOG_FD && |
| 1196 | $1_CFLAGS=`$PKG_CONFIG --cflags "$2" 2>&AS_MESSAGE_LOG_FD` && | 1201 | $1_CFLAGS=`"$PKG_CONFIG" --cflags "$2" 2>&AS_MESSAGE_LOG_FD` && |
| 1197 | $1_LIBS=`$PKG_CONFIG --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then | 1202 | $1_LIBS=`"$PKG_CONFIG" --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then |
| 1198 | edit_cflags=" | 1203 | edit_cflags=" |
| 1199 | s,///*,/,g | 1204 | s,///*,/,g |
| 1200 | s/^/ / | 1205 | s/^/ / |
| @@ -1212,7 +1217,7 @@ AC_DEFUN([PKG_CHECK_MODULES], [ | |||
| 1212 | ## If we have a custom action on failure, don't print errors, but | 1217 | ## If we have a custom action on failure, don't print errors, but |
| 1213 | ## do set a variable so people can do so. Do it in a subshell | 1218 | ## do set a variable so people can do so. Do it in a subshell |
| 1214 | ## to capture any diagnostics in invoking pkg-config. | 1219 | ## to capture any diagnostics in invoking pkg-config. |
| 1215 | $1_PKG_ERRORS=`($PKG_CONFIG --print-errors "$2") 2>&1` | 1220 | $1_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$2") 2>&1` |
| 1216 | ifelse([$4], ,echo "$$1_PKG_ERRORS",) | 1221 | ifelse([$4], ,echo "$$1_PKG_ERRORS",) |
| 1217 | fi | 1222 | fi |
| 1218 | 1223 | ||
| @@ -2027,7 +2032,7 @@ if test x"$pkg_check_gtk" = xyes; then | |||
| 2027 | AC_DEFINE(USE_GTK, 1, [Define to 1 if using GTK.]) | 2032 | AC_DEFINE(USE_GTK, 1, [Define to 1 if using GTK.]) |
| 2028 | GTK_OBJ="gtkutil.o $GTK_OBJ" | 2033 | GTK_OBJ="gtkutil.o $GTK_OBJ" |
| 2029 | USE_X_TOOLKIT=none | 2034 | USE_X_TOOLKIT=none |
| 2030 | if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then | 2035 | if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then |
| 2031 | : | 2036 | : |
| 2032 | else | 2037 | else |
| 2033 | AC_MSG_WARN([[Your version of Gtk+ will have problems with | 2038 | AC_MSG_WARN([[Your version of Gtk+ will have problems with |
| @@ -4508,7 +4513,7 @@ AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \ | |||
| 4508 | dnl test/ is not present in release tarfiles. | 4513 | dnl test/ is not present in release tarfiles. |
| 4509 | opt_makefile=test/automated/Makefile | 4514 | opt_makefile=test/automated/Makefile |
| 4510 | 4515 | ||
| 4511 | if test -f $srcdir/${opt_makefile}.in; then | 4516 | if test -f "$srcdir/$opt_makefile.in"; then |
| 4512 | SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" | 4517 | SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" |
| 4513 | dnl Again, it's best not to use a variable. Though you can add | 4518 | dnl Again, it's best not to use a variable. Though you can add |
| 4514 | dnl ", [], [opt_makefile='$opt_makefile']" and it should work. | 4519 | dnl ", [], [opt_makefile='$opt_makefile']" and it should work. |
| @@ -4519,7 +4524,7 @@ fi | |||
| 4519 | dnl admin/ may or may not be present. | 4524 | dnl admin/ may or may not be present. |
| 4520 | opt_makefile=admin/unidata/Makefile | 4525 | opt_makefile=admin/unidata/Makefile |
| 4521 | 4526 | ||
| 4522 | if test -f $srcdir/${opt_makefile}.in; then | 4527 | if test -f "$srcdir/$opt_makefile.in"; then |
| 4523 | SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" | 4528 | SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" |
| 4524 | AC_CONFIG_FILES([admin/unidata/Makefile]) | 4529 | AC_CONFIG_FILES([admin/unidata/Makefile]) |
| 4525 | fi | 4530 | fi |
| @@ -4550,9 +4555,9 @@ ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force | |||
| 4550 | ], [GCC="$GCC" CPPFLAGS="$CPPFLAGS"]) | 4555 | ], [GCC="$GCC" CPPFLAGS="$CPPFLAGS"]) |
| 4551 | 4556 | ||
| 4552 | AC_CONFIG_COMMANDS([gdbinit], [ | 4557 | AC_CONFIG_COMMANDS([gdbinit], [ |
| 4553 | if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then | 4558 | if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then |
| 4554 | echo creating src/.gdbinit | 4559 | echo creating src/.gdbinit |
| 4555 | echo source $srcdir/src/.gdbinit > src/.gdbinit | 4560 | echo "source '$srcdir/src/.gdbinit'" > src/.gdbinit |
| 4556 | fi | 4561 | fi |
| 4557 | ]) | 4562 | ]) |
| 4558 | 4563 | ||