Avoid ‘test’ misuse with ‘./configure gt_cv_locale_fr=""’.
Possible problem of this sort reported by Angelo Graziosi in:
https://lists.gnu.org/r/emacs-devel/2023-07/msg00329.html
* m4/locale-fr.m4 (gt_LOCALE_FR_UTF8, gt_LOCALE_FR_UTF8):
* m4/locale-ja.m4 (gt_LOCALE_JA):
* m4/locale-zh.m4 (gt_LOCALE_ZH_CN):
Reject locale names that might cause trouble with sh or make.
+2023-07-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ c32width: protect against bad configure args
+ Avoid ‘test’ misuse with ‘./configure gt_cv_locale_fr=""’.
+ Possible problem of this sort reported by Angelo Graziosi in:
+ https://lists.gnu.org/r/emacs-devel/2023-07/msg00329.html
+ * m4/locale-fr.m4 (gt_LOCALE_FR_UTF8, gt_LOCALE_FR_UTF8):
+ * m4/locale-ja.m4 (gt_LOCALE_JA):
+ * m4/locale-zh.m4 (gt_LOCALE_ZH_CN):
+ Reject locale names that might cause trouble with sh or make.
+
2023-07-06 Bruno Haible <bruno@clisp.org>
wcscmp: Work around a glibc bug.
-# locale-fr.m4 serial 21
+# locale-fr.m4 serial 22
dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
rm -fr conftest*
])
LOCALE_FR=$gt_cv_locale_fr
+ case $LOCALE_FR in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_FR"; assuming "none"])
+ LOCALE_FR=none;;
+ esac
AC_SUBST([LOCALE_FR])
])
esac
])
LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+ case $LOCALE_FR_UTF8 in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_FR_UTF8"; assuming "none"])
+ LOCALE_FR_UTF8=none;;
+ esac
AC_SUBST([LOCALE_FR_UTF8])
dnl Users of $LOCALE_FR_UTF8 need to know which of the locale categories they
-# locale-ja.m4 serial 16
+# locale-ja.m4 serial 17
dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
rm -fr conftest*
])
LOCALE_JA=$gt_cv_locale_ja
+ case $LOCALE_JA in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_JA"; assuming "none"])
+ LOCALE_JA=none;;
+ esac
AC_SUBST([LOCALE_JA])
])
-# locale-zh.m4 serial 16
+# locale-zh.m4 serial 17
dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
rm -fr conftest*
])
LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+ case $LOCALE_ZH_CN in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_ZH_CN"; assuming "none"])
+ LOCALE_ZH_CN=none;;
+ esac
AC_SUBST([LOCALE_ZH_CN])
])