diff options
| author | Your Name | 2023-04-25 20:28:38 +0800 |
|---|---|---|
| committer | Your Name | 2023-04-25 20:28:38 +0800 |
| commit | b8f94eb0f148e774981ce711a12db604ebd174bc (patch) | |
| tree | 8b66a4fe82ff6128652cbe79ca61e9fed31d93e3 | |
| parent | d18c4ef4feaccf7bad67e6c0c5b00cdadd81ba1a (diff) | |
| download | emacs-b8f94eb0f148e774981ce711a12db604ebd174bc.tar.gz emacs-b8f94eb0f148e774981ce711a12db604ebd174bc.zip | |
Fix configure.ac for some Bourne shells
This fixes running configure under /bin/sh on Solaris 10, and
some other Unix systems.
* configure.ac: Avoid POSIX style command substitutions.
(emacs_major_version): Avoid POSIX style pattern substitution.
(PORT_PACKAGE, MAC_FLAGS, MAC_LIBS): Avoid POSIX style command
substitutions.
| -rw-r--r-- | configure.ac | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac index 55396bdd6ff..118f31fae96 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -1001,7 +1001,7 @@ AC_ARG_ENABLE([gcc-warnings], | |||
| 1001 | # however, if there is also a .tarball-version file it is probably | 1001 | # however, if there is also a .tarball-version file it is probably |
| 1002 | # just a release imported into Git for patch management. | 1002 | # just a release imported into Git for patch management. |
| 1003 | gl_gcc_warnings=no | 1003 | gl_gcc_warnings=no |
| 1004 | if test -e "$srcdir"/.git && test ! -f "$srcdir"/.tarball-version; then | 1004 | if test -d "$srcdir"/.git && test ! -f "$srcdir"/.tarball-version; then |
| 1005 | # Clang typically identifies itself as GCC 4.2 or something similar | 1005 | # Clang typically identifies itself as GCC 4.2 or something similar |
| 1006 | # even if it is recent enough to accept the warnings we enable. | 1006 | # even if it is recent enough to accept the warnings we enable. |
| 1007 | AS_IF([test "$emacs_cv_clang" = yes], | 1007 | AS_IF([test "$emacs_cv_clang" = yes], |
| @@ -2034,31 +2034,23 @@ if test "${with_ns}" != no; then | |||
| 2034 | ns_appresdir=${ns_appdir}/Contents/Resources | 2034 | ns_appresdir=${ns_appdir}/Contents/Resources |
| 2035 | ns_appsrc=Cocoa/Emacs.base | 2035 | ns_appsrc=Cocoa/Emacs.base |
| 2036 | ns_fontfile=macfont.o | 2036 | ns_fontfile=macfont.o |
| 2037 | elif flags=$( (gnustep-config --objc-flags) 2>/dev/null); then | 2037 | elif flags=`(gnustep-config --objc-flags) 2>/dev/null`; then |
| 2038 | NS_IMPL_GNUSTEP=yes | 2038 | NS_IMPL_GNUSTEP=yes |
| 2039 | NS_GNUSTEP_CONFIG=yes | 2039 | NS_GNUSTEP_CONFIG=yes |
| 2040 | GNU_OBJC_CFLAGS="$flags" | 2040 | GNU_OBJC_CFLAGS="$flags" |
| 2041 | LIBS_GNUSTEP=$(gnustep-config --gui-libs) || exit | 2041 | LIBS_GNUSTEP=`gnustep-config --gui-libs || exit` |
| 2042 | elif test -f $GNUSTEP_CONFIG_FILE; then | 2042 | elif test -f $GNUSTEP_CONFIG_FILE; then |
| 2043 | NS_IMPL_GNUSTEP=yes | 2043 | NS_IMPL_GNUSTEP=yes |
| 2044 | dnl FIXME sourcing this several times in subshells seems inefficient. | 2044 | dnl FIXME sourcing this several times in subshells seems inefficient. |
| 2045 | GNUSTEP_SYSTEM_HEADERS=$( | 2045 | GNUSTEP_SYSTEM_HEADERS=`. $GNUSTEP_CONFIG_FILE \ |
| 2046 | . $GNUSTEP_CONFIG_FILE | 2046 | && AS_ECHO(["$GNUSTEP_SYSTEM_HEADERS"])` |
| 2047 | AS_ECHO(["$GNUSTEP_SYSTEM_HEADERS"]) | 2047 | GNUSTEP_SYSTEM_LIBRARIES=` . $GNUSTEP_CONFIG_FILE \ |
| 2048 | ) | 2048 | && AS_ECHO(["$GNUSTEP_SYSTEM_LIBRARIES"])` |
| 2049 | GNUSTEP_SYSTEM_LIBRARIES=$( | ||
| 2050 | . $GNUSTEP_CONFIG_FILE | ||
| 2051 | AS_ECHO(["$GNUSTEP_SYSTEM_LIBRARIES"]) | ||
| 2052 | ) | ||
| 2053 | dnl I seemed to need these as well with GNUstep-startup 0.25. | 2049 | dnl I seemed to need these as well with GNUstep-startup 0.25. |
| 2054 | GNUSTEP_LOCAL_HEADERS=$( | 2050 | GNUSTEP_LOCAL_HEADERS=`. $GNUSTEP_CONFIG_FILE \ |
| 2055 | . $GNUSTEP_CONFIG_FILE | 2051 | && AS_ECHO(["$GNUSTEP_LOCAL_HEADERS"])` |
| 2056 | AS_ECHO(["$GNUSTEP_LOCAL_HEADERS"]) | 2052 | GNUSTEP_LOCAL_LIBRARIES=`. $GNUSTEP_CONFIG_FILE \ |
| 2057 | ) | 2053 | && AS_ECHO(["$GNUSTEP_LOCAL_LIBRARIES"])` |
| 2058 | GNUSTEP_LOCAL_LIBRARIES=$( | ||
| 2059 | . $GNUSTEP_CONFIG_FILE | ||
| 2060 | AS_ECHO(["$GNUSTEP_LOCAL_LIBRARIES"]) | ||
| 2061 | ) | ||
| 2062 | test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ | 2054 | test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ |
| 2063 | GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" | 2055 | GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" |
| 2064 | test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ | 2056 | test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ |
| @@ -4207,7 +4199,7 @@ module_env_snippet_27="$srcdir/src/module-env-27.h" | |||
| 4207 | module_env_snippet_28="$srcdir/src/module-env-28.h" | 4199 | module_env_snippet_28="$srcdir/src/module-env-28.h" |
| 4208 | module_env_snippet_29="$srcdir/src/module-env-29.h" | 4200 | module_env_snippet_29="$srcdir/src/module-env-29.h" |
| 4209 | module_env_snippet_30="$srcdir/src/module-env-30.h" | 4201 | module_env_snippet_30="$srcdir/src/module-env-30.h" |
| 4210 | emacs_major_version="${PACKAGE_VERSION%%.*}" | 4202 | emacs_major_version=`AS_ECHO([$PACKAGE_VERSION]) | sed 's/[[.]].*//'` |
| 4211 | AC_SUBST([emacs_major_version]) | 4203 | AC_SUBST([emacs_major_version]) |
| 4212 | 4204 | ||
| 4213 | ### Emacs Lisp native compiler support | 4205 | ### Emacs Lisp native compiler support |
| @@ -4317,14 +4309,16 @@ if test "${with_native_compilation}" != "no"; then | |||
| 4317 | # available. (We filter out the gcc4 packages, because they | 4309 | # available. (We filter out the gcc4 packages, because they |
| 4318 | # don't support jit, and they have names like "gcc49" that | 4310 | # don't support jit, and they have names like "gcc49" that |
| 4319 | # sort later than "gcc11".) | 4311 | # sort later than "gcc11".) |
| 4320 | PORT_PACKAGE=$(port installed active | grep '^ *gcc@<:@0-9@:>@* ' | \ | 4312 | PORT_PACKAGE=`port installed active | grep '^ *gcc@<:@0-9@:>@* ' | \ |
| 4321 | awk '{ print $1; }' | grep -v 'gcc4@<:@0-9@:>@' | \ | 4313 | awk '{ print $1; }' | grep -v 'gcc4@<:@0-9@:>@' | \ |
| 4322 | sort -V | tail -n 1) | 4314 | sort -V | tail -n 1` |
| 4323 | if test -n "$PORT_PACKAGE"; then | 4315 | if test -n "$PORT_PACKAGE"; then |
| 4324 | MAC_CFLAGS="-I$(dirname $(port contents $PORT_PACKAGE | \ | 4316 | emacs_val=`port contents $PORT_PACKAGE | grep libgccjit.h` |
| 4325 | grep libgccjit.h))" | 4317 | emacs_val=`dirname $emacs_val` |
| 4326 | MAC_LIBS="-L$(dirname $(port contents $PORT_PACKAGE | \ | 4318 | MAC_CFLAGS="-I$emacs_val" |
| 4327 | grep libgccjit.dylib))" | 4319 | emacs_val=`port contents $PORT_PACKAGE | grep libgccjit.dylib` |
| 4320 | emacs_val=`dirname $emacs_val` | ||
| 4321 | MAC_LIBS="-L$emacs_val" | ||
| 4328 | fi | 4322 | fi |
| 4329 | fi | 4323 | fi |
| 4330 | 4324 | ||