aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2012-12-08 18:22:39 -0800
committerPaul Eggert2012-12-08 18:22:39 -0800
commit3cc53d60248e48c971a0e78d11bc7cf8c2b02fe2 (patch)
treea692610088d165c54bfbd5962a252e2fb2e06a8d
parentc6c08d3f8fe4d2c9e588189e46d60a30ef3e8d20 (diff)
downloademacs-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--ChangeLog7
-rw-r--r--configure.ac53
2 files changed, 36 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index f31a03833c1..04dc73eb683 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
12012-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
12012-12-08 Paul Eggert <eggert@cs.ucla.edu> 82012-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
131dnl FIXME currently it is not the last. 131dnl FIXME currently it is not the last.
132dnl This should be the last --with option, because --with-x is 132dnl This should be the last --with option, because --with-x is
133dnl added later on when we find the path of X, and it's best to 133dnl added later on when we find the file name of X, and it's best to
134dnl keep them together visually. 134dnl keep them together visually.
135AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT], 135AC_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
205AC_SUBST(GZIP_INFO) 205AC_SUBST(GZIP_INFO)
206 206
207AC_ARG_WITH([pkg-config-prog],dnl 207AC_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])])
210if test "X${with_pkg_config_prog}" != X; then 210if 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 \
226test "X$gameuser" = X && gameuser=games 226test "X$gameuser" = X && gameuser=games
227 227
228AC_ARG_WITH([gnustep-conf],dnl 228AC_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])])
230test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ 231test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
231 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" 232 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
232test "X$GNUSTEP_CONFIG_FILE" = "X" && \ 233test "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)` ;;
378esac 379esac
379 380
380### Canonicalize the configuration name. 381### Canonicalize the configuration name.
@@ -810,9 +811,13 @@ fi
810AC_PATH_PROG(MAKEINFO, makeinfo, no) 811AC_PATH_PROG(MAKEINFO, makeinfo, no)
811dnl By this stage, configure has already checked for egrep and set EGREP, 812dnl By this stage, configure has already checked for egrep and set EGREP,
812dnl or exited with an error if no egrep was found. 813dnl or exited with an error if no egrep was found.
813if test "$MAKEINFO" != "no" && \ 814if 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
816fi 821fi
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
835source tree does not seem to have pre-built manuals in the `info' directory. 840source tree does not seem to have pre-built manuals in the `info' directory.
836Either install a suitable version of makeinfo, or re-run configure 841Either 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 \
4508dnl test/ is not present in release tarfiles. 4513dnl test/ is not present in release tarfiles.
4509opt_makefile=test/automated/Makefile 4514opt_makefile=test/automated/Makefile
4510 4515
4511if test -f $srcdir/${opt_makefile}.in; then 4516if 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
4519dnl admin/ may or may not be present. 4524dnl admin/ may or may not be present.
4520opt_makefile=admin/unidata/Makefile 4525opt_makefile=admin/unidata/Makefile
4521 4526
4522if test -f $srcdir/${opt_makefile}.in; then 4527if 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])
4525fi 4530fi
@@ -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
4552AC_CONFIG_COMMANDS([gdbinit], [ 4557AC_CONFIG_COMMANDS([gdbinit], [
4553if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then 4558if 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
4556fi 4561fi
4557]) 4562])
4558 4563